- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 16 for isF32 (0.03 sec)
-
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/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/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) -
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) -
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) -
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)