Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 52 for isF32 (0.03 sec)

  1. 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)
  2. tensorflow/compiler/mlir/lite/transforms/while_loop_outline.cc

    }
    
    bool IsCompatibleTypeWithTFLCastOp(Type type) {
      auto elemType = getElementTypeOrSelf(type);
      // F16, F32, F64, BF16 types are allowed.
      if (elemType.isBF16() || elemType.isF16() || elemType.isF32() ||
          elemType.isF64())
        return true;
    
      // I1, I4, I8, I16, I32, I64 types are allowed.
      if (elemType.isInteger(1) || elemType.isInteger(4) || elemType.isInteger(8) ||
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/optimize.td

        Constraint<CPred<"TFL::IsBroadcastableElementsAttrs($0, $1) && TFL::IsDimensionsDegenerateExceptLastOne($1)">>;
    
    def F32ElementsAttr : ElementsAttrBase<
        CPred<"$_self.cast<ElementsAttr>().getShapedType().getElementType().isF32()">, "float constant tensor">;
    def DefinedByConv2D : Constraint<CPred<"llvm::isa_and_nonnull<mlir::TF::Conv2DOp>($0.getDefiningOp())">>;
    // Checks if the value has only one user.
    def HasOneUse : Constraint<CPred<"$0.hasOneUse()">>;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Apr 22 07:31:23 UTC 2023
    - 5.4K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/transforms/unfold_large_splat_constant.cc

            mlir::dyn_cast<SplatElementsAttr>(const_op.getValue());
        if (!splat_elements_attr) {
          return;
        }
        auto element_type = splat_elements_attr.getType().getElementType();
        if (!(element_type.isF32() || element_type.isF16() ||
              element_type.isInteger(1) || element_type.isInteger(32) ||
              element_type.isInteger(64))) {
          return;
        }
        if (splat_elements_attr.getNumElements() *
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/transforms/dense_to_sparse.cc

      std::vector<int> b_size = {};
      std::vector<int> b_map = {};
      PopulateEncodingParams(block_size, &traversal_order, &format, &b_map,
                             &b_size);
    
      if (type.getElementType().isF32()) {
        tflite::internal::sparsity::FormatConverter<float> format_converter(
            shape, traversal_order, format, b_size, b_map);
        std::vector<float> data;
        data.reserve(type.getNumElements());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 16.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/fused_kernel_matcher.cc

                 << ")";
          });
          return false;
        }
    
        // Verify the data type is supported.
        Type element_ty = getElementTypeOrSelf(conv.getType());
        if (!element_ty.isF32() && !element_ty.isF64()) {
          (void)rewriter.notifyMatchFailure(conv, [&](Diagnostic &diag) {
            diag << "supported data types for _FusedConv2D are float and double, "
                 << " but got " << element_ty;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.9K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/utils/validators.h

    // is "DT_FLOAT".
    inline bool TFTypeIsFloat32Tensor(Value value) {
      auto tensorType = mlir::dyn_cast<TensorType>(value.getType());
      if (!tensorType) return false;
      return tensorType.getElementType().isF32();
    }
    
    // Returns true iff the given value is a bf16 tensor.
    inline bool TFTypeIsBFloat16Tensor(Value value) {
      auto tensorType = mlir::dyn_cast<TensorType>(value.getType());
      if (!tensorType) return false;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  8. 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)
  9. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize.cc

                  dq_op->getLoc(), dq_arg_type.clone(qtype.getStorageType()),
                  dq_op.getArg());
              inputs.push_back(scast_op.getResult());
            } else if (!elem_type.isF32()) {
              // If the operand is an integer tensor, then it doesn't require the
              // DQ op in the pattern.
              inputs.push_back(operand);
            } else {
              return failure();
            }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 22 05:52:39 UTC 2024
    - 23.6K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/experimental/tac/transforms/device_transform.cc

        if (!IsQI32Type(input_dequant.getType())) return failure();
    
        auto output_type =
            mlir::dyn_cast_or_null<ShapedType>(dequant_op.getOutput().getType());
        if (!output_type || !output_type.getElementType().isF32()) return failure();
    
        auto input_type = mlir::dyn_cast<ShapedType>(input_dequant.getType());
        // TODO(renjieliu): support UniformQuantizedPerAxisType.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.4K bytes
    - Viewed (0)
Back to top