- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 52 for isF32 (0.04 sec)
-
tensorflow/compiler/mlir/lite/utils/variables_utils.cc
// Check complex types. if (auto complex_type = element_type.dyn_cast<mlir::ComplexType>()) { auto complex_element_type = complex_type.getElementType(); if (complex_element_type.isF32() || complex_element_type.isF64()) return true; } // Check quantized types. if (auto quant_type = element_type.dyn_cast<mlir::quant::QuantizedType>()) { // TFLite supports QI16, QI32, QI8, and QUI8
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Jun 21 19:32:03 UTC 2021 - 2.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/constant_utils.cc
} else if (element_type.isF32()) { return DenseElementsAttr::get<float>(shaped_type, static_cast<float>(value)); } else if (auto complex_type = mlir::dyn_cast<mlir::ComplexType>(element_type)) { auto etype = complex_type.getElementType(); if (etype.isF32()) { tensorflow::TensorProto repr;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/perception_ops_utils.cc
if (!image_type || !image_type.getElementType().isF32() || image_type.getRank() != 4) { return func_.emitWarning() << "Image should be a 4D float tensor"; } auto flow_type = mlir::dyn_cast_or_null<RankedTensorType>( func_.getFunctionType().getInput(1)); if (!flow_type || !flow_type.getElementType().isF32() || flow_type.getRank() != 4) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 17 17:58:54 UTC 2024 - 8.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/legalize_tensorlist.cc
if (HasVariantInputOrOutput(op)) { std::optional<mlir::Type> element_type = GetSingularVariantBaseType(op->getOperand(0)); if (element_type.has_value()) { return element_type->isF32() || element_type->isInteger(32); } } } // Op is vacuously "supported" if it is not a tensorlist op. StringRef op_name = op->getName().getStringRef();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 07 23:04:40 UTC 2024 - 10.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/common/uniform_quantized_types_test.cc
CreateI8F32UniformQuantizedType(UnknownLoc::get(&ctx_), ctx_, /*scale=*/1.0, /*zero_point=*/0); EXPECT_TRUE(quantized_type.getExpressedType().isF32()); } TEST_F(CreateI8F32UniformQuantizedTypeTest, SignedQuantizedTypeSucceeds) { const UniformQuantizedType quantized_type = CreateI8F32UniformQuantizedType(UnknownLoc::get(&ctx_), ctx_,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 28.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/utils/convert_type.cc
} } Status ConvertScalarTypeToDataType(Type type, DataType* dtype) { if (type.isF16()) { *dtype = DT_HALF; return absl::OkStatus(); } else if (type.isF32()) { *dtype = DT_FLOAT; return absl::OkStatus(); } else if (type.isF64()) { *dtype = DT_DOUBLE; return absl::OkStatus(); } else if (type.isBF16()) { *dtype = DT_BFLOAT16;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Apr 26 09:37:10 UTC 2024 - 7.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/convert_type.cc
return tflite::TensorType_BFLOAT16; } else if (type.isF32()) { return tflite::TensorType_FLOAT32; } else if (type.isF64()) { return tflite::TensorType_FLOAT64; } else if (mlir::isa<mlir::TF::StringType>(type)) { return tflite::TensorType_STRING; } else if (auto complex_type = mlir::dyn_cast<mlir::ComplexType>(type)) { if (complex_type.getElementType().isF32()) { return tflite::TensorType_COMPLEX64;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 07 23:04:40 UTC 2024 - 8.2K bytes - Viewed (0) -
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) -
tensorflow/compiler/mlir/tensorflow/transforms/rewrite_util.h
return DenseElementsAttr::get(scalar_ty, attr); } else if (auto complex_ty = mlir::dyn_cast<ComplexType>(ty)) { Type complex_element_ty = complex_ty.getElementType(); if (complex_element_ty.isF32()) { return DenseElementsAttr::get( scalar_ty, static_cast<std::complex<float>>(raw_value)); } else if (complex_element_ty.isF64()) { return DenseElementsAttr::get(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 22 19:47:48 UTC 2024 - 4K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/quantization_patterns.h
if (auto dq_op = dyn_cast_or_null<DequantizeOpT>(operand.getDefiningOp())) { inputs.push_back(dq_op.getOperand()); } else if (!ele_type.isF32()) { // If the operand is an integer tensor, then it doesn't require the // DequantizeOp in the pattern. inputs.push_back(operand); } else if (weight_only_quantizable) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 10.9K bytes - Viewed (0)