Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 52 for getElementDtype (0.27 sec)

  1. tensorflow/compiler/mlir/lite/transforms/quantize_patterns.td

    def QuantizeByQuantizedType : NativeCodeCall<"quant::Quantize($0, $1.getValue())">;
    def F32ElementsAttr : ElementsAttrBase<
      CPred<"$_self.cast<ElementsAttr>().getShapedType().getElementType().isF32()">, "float constant tensor">;
    
    // Squash tfl.dequantize and tfl.quantize pairs.
    // TODO(fengliuai): Compare the scale of input and output. This can also be
    // squashed to a requantize op if the scales are different.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 23:10:13 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/experimental/tac/transforms/device_transform.cc

        if (!output_type || !output_type.getElementType().isF32()) return failure();
    
        auto input_type = mlir::dyn_cast<ShapedType>(input_dequant.getType());
        // TODO(renjieliu): support UniformQuantizedPerAxisType.
        auto q_type = mlir::dyn_cast_or_null<quant::UniformQuantizedType>(
            input_type.getElementType());
        if (!q_type) return failure();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/stablehlo/transforms/composite_utils.cc

      output_shape[3] = composite_result_shape[1];
    
      auto input_type = mlir::cast<ShapedType>(old_op->getOperand(0).getType());
    
      return RankedTensorType::get(output_shape, input_type.getElementType());
    }
    }  // namespace odml
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 29 18:33:05 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/transforms/default_quant_params.cc

      // doesn't require quantization.
      auto tensor_type = mlir::dyn_cast<TensorType>(value.getType());
      if (!tensor_type) {
        // There are none type values.
        return;
      }
      if (!tensor_type.getElementType().isF32()) return;
    
      // If the result is consumed by a quantize op, it has been quantized.
      if (value.hasOneUse() &&
          llvm::isa<TFL::QuantizeOp>(*value.getUsers().begin()))
        return;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/stablehlo/transforms/unfold_splat_constant_pass.cc

        if (!splat_elements_attr) {
          return;
        }
        if (splat_elements_attr.getNumElements() == 1) {
          return;
        }
        auto element_type = splat_elements_attr.getType().getElementType();
        if (mlir::isa<ComplexType>(element_type) ||
            mlir::isa<quant::QuantizedType>(element_type)) {
          return;
        }
        op_builder->setInsertionPoint(const_op);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_layout_helper.cc

        SmallVector<int64_t, 4> new_shape(permutation.size());
        for (size_t i = 0; i < permutation.size(); ++i)
          new_shape[i] = shape[permutation[i]];
    
        return RankedTensorType::get(new_shape, ranked_type.getElementType());
      }
    
      return type;
    }
    
    bool AreCancellablePermutations(DenseIntElementsAttr perm0,
                                    DenseIntElementsAttr perm1) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/common/ir/UniformSupport.cc

    }
    
    ExpressedToQuantizedConverter ExpressedToQuantizedConverter::forInputType(
        Type input_type) {
      if (isa<TensorType, VectorType>(input_type)) {
        Type element_type = cast<ShapedType>(input_type).getElementType();
        if (!isQuantizablePrimitiveType(element_type))
          return ExpressedToQuantizedConverter{input_type, nullptr};
        return ExpressedToQuantizedConverter{input_type, element_type};
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 08 02:10:16 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/experimental/tac/common/utils.h

    // Returns true if it is a shaped type of f32 elements.
    inline bool IsF32ShapedType(Type t) {
      if (auto shaped_type = mlir::dyn_cast_or_null<ShapedType>(t)) {
        return shaped_type.getElementType().isF32();
      }
      return false;
    }
    
    // Return true when the given element_type is QI8.
    inline bool IsQI8Type(Type t) {
      auto quantized_type = quant::QuantizedType::getQuantizedElementType(t);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_with_tf2xla.cc

      auto original = mlir::dyn_cast<ShapedType>(original_ty);
    
      // Both types must be shaped types.
      if (!original || !updated) return false;
    
      // Element types must match.
      if (original.getElementType() != updated.getElementType()) return false;
    
      // If the updated type doesn't have a rank, then it can't be a more refined
      // type.
      if (!updated.hasRank()) return false;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 21:49:50 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  10. platforms/core-configuration/model-core/src/main/java/org/gradle/api/internal/provider/CollectionPropertyInternal.java

    import java.util.Collection;
    
    public interface CollectionPropertyInternal<T, C extends Collection<T>> extends PropertyInternal<C>, HasMultipleValues<T>, CollectionProviderInternal<T, C> {
        @Override
        Class<T> getElementType();
    
        /**
         * Adds an element to the property value.
         *
         * <p>
         * When invoked on a property with no value, this method first sets the value
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 23 18:32:13 UTC 2024
    - 3.5K bytes
    - Viewed (0)
Back to top