Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 17 of 17 for isF32 (0.03 sec)

  1. 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)
  2. 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)
  3. 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)
  4. tensorflow/compiler/mlir/quantization/stablehlo/passes/fold_constant_transpose.cc

        if (!const_op) return failure();
    
        // Only support float tensors.
        auto tensor_type = mlir::dyn_cast_or_null<TensorType>(const_op.getType());
        if (!tensor_type || !tensor_type.getElementType().isF32()) {
          return failure();
        }
    
        return success(
            mlir::isa_and_nonnull<DenseFPElementsAttr>(const_op.getValue()));
      }
    
      void rewrite(mlir::stablehlo::TransposeOp op,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/common/attrs_and_constraints.td

    def IsInt32ElementType : Constraint<
      CPred<"getElementTypeOrSelf($0).isInteger(32)">>;
    
    // Checks if the value has the type of float32.
    def IsF32ElementType : Constraint<
      CPred<"getElementTypeOrSelf($0).isF32()">>;
    
    // Checks if the value has the type of bfloat16.
    def IsBF16ElementType : Constraint<
      CPred<"getElementTypeOrSelf($0).isBF16()">>;
    
    // Checks if the value has the type of UniformQuantizedType.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 08 04:55:44 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/stablehlo/odml_converter/transforms/outline_composites.cc

      auto cst_op = llvm::dyn_cast_or_null<stablehlo::ConstantOp>(cst_input);
      if (!cst_op) return false;
      ElementsAttr value = cst_op.getValue();
      if (!value.isSplat()) return false;
      if (!value.getElementType().isF32()) return false;
      return std::abs(value.getSplatValue<float>() - val) < kTolerance;
    }
    
    // Determines if the given op is semantically that of the gauss error function.
    bool MatchERF(Operation* op) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  7. 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)
Back to top