Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 171 for getElementDtype (0.27 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/optimize.td

      "  $0.getType().cast<RankedTensorType>().getRank() - 1)">]>>;
    
    def IsNotComplexType : Constraint<And<[
      CPred<"$0.getType().isa<RankedTensorType>()">,
      CPred<"!$0.getType().cast<ShapedType>().getElementType().isa<ComplexType>()">
    ]>>;
    
    // Only fuse multiplier if all dimensions other than the channel dimension
    // are equal to 1.
    def CanFuseMulAndConv2D :
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Apr 22 07:31:23 UTC 2023
    - 5.4K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/reduce.h

        Value iota = reduce_op.getInputs().back();
        if (!MatchIota(reduce_op.getDimensions(), iota)) return failure();
    
        // Match the reduction computation.
        const bool is_float = mlir::isa<FloatType>(operand_init.getElementType());
        if (failed(MatchReduceToArgMinMaxType1(reduce_op, is_float, is_argmax)) &&
            failed(MatchReduceToArgMinMaxType2(reduce_op, is_argmax)))
          return rewriter.notifyMatchFailure(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/common/uniform_quantized_types.h

    bool IsExpressedTypeF32(QuantizedType quantized_type);
    
    // Given a value, extract the `ElementType`.
    // `value` should be a non-null `TensorType`.
    inline Type GetElementType(const Value value) {
      return mlir::cast<TensorType>(value.getType()).getElementType();
    }
    
    // Returns true iff `type` is a uniform quantized type whose storage type is
    // 8-bit integer and expressed type is f32.
    bool IsI8F32UniformQuantizedType(Type type);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/stablehlo/transforms/tflite_legalize_hlo.cc

     public:
      using ConvertReduceOpToArgMinMax::ConvertReduceOpToArgMinMax;
    
      bool IsValueInitValue(const DenseElementsAttr& attr) const override {
        auto element_type = attr.getType().getElementType();
        if (attr.getNumElements() != 1 || !element_type.isIntOrFloat())
          return false;
        if (mlir::isa<FloatType>(element_type)) {
          auto value = *attr.value_begin<APFloat>();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/utils/tf_quantize_op_utils.cc

    UnrankedTensorType CreateUnknownShapeFromElementType(Type tensor_type) {
      if (!mlir::cast<TensorType>(tensor_type)) return UnrankedTensorType();
      return UnrankedTensorType::get(
          mlir::cast<TensorType>(tensor_type).getElementType());
    }
    
    }  // namespace quant
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/stablehlo/transforms/fold_broadcast_pass.cc

      if (!lhs || !rhs) return {};
    
      ShapedType type = mlir::cast<ShapedType>(op->getType());
      if (!type.hasStaticShape()) {
        return {};
      }
    
      Type etype = type.getElementType();
    
      // Evaluate for element types.
      if (!mlir::isa<ElementType>(etype)) {
        return {};
      }
    
      // Special case for folding splats no matter how large.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/tensorflow/ops/tf_op_quant_spec.cc

    }
    
    bool IsValueWithQuantizablePrecision(Value val) {
      auto type = mlir::dyn_cast<ShapedType>(val.getType());
      if (!type) return false;
      // Supported original tensor data types.
      if (type.getElementType().isF32() || type.getElementType().isBF16())
        return true;
      return false;
    }
    
    std::optional<tensorflow::quantization::QuantizationComponentSpec>
    GetWeightComponentSpec(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_traits.h

        QuantizedType GetResultQuantizedType(int index) {
          auto op = this->getOperation();
          const auto result_type =
              op->getResult(index).getType().template cast<ShapedType>();
          if (!result_type.getElementType().template isa<FloatType>()) return {};
          Builder builder(op->getContext());
          const IntegerType storage_type = builder.getIntegerType(BitWidth);
          const double scale = static_cast<double>(ScaleMantissa) *
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 07:39:40 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/transforms/post_quantize.cc

                           /*output_axis=*/0, &input_indices, &new_values);
        auto result_type =
            RankedTensorType::get(output_shape, output_type.getElementType());
        auto values_type = RankedTensorType::get(
            output_shape,
            mlir::cast<quant::UniformQuantizedType>(output_type.getElementType())
                .getStorageType());
        rewriter.replaceOpWithNewOp<QConstOp>(
            op, TypeAttr::get(result_type),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf.cc

                                                GetI64ElementsAttr({0}, &rewriter),
                                                input_type.getElementType());
        assert(!input_type.getElementType().isInteger(1) &&
               "data type should not be i1");
        BuildReduceBody<AddOp>(input_type.getElementType(), &reduce.getBody(),
                               &rewriter);
        rewriter.replaceOpWithNewOp<ReshapeOp>(
            op,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 20:00:43 UTC 2024
    - 291.8K bytes
    - Viewed (0)
Back to top