- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 55 for getElementDtype (0.32 sec)
-
tensorflow/compiler/mlir/lite/transforms/decompose_hybrid_quantization.cc
allTypesQuantizedOrInt &= (mlir::isa<quant::QuantizedType>(type.getElementType()) || mlir::isa<IntegerType>(type.getElementType())); } for (auto result : op->getResults()) { ShapedType type = mlir::cast<ShapedType>(result.getType()); allTypesFp &= !mlir::isa<quant::QuantizedType>(type.getElementType()); allTypesQuantizedOrInt &=
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/attribute_utils.cc
namespace mlir { namespace TFL { FloatAttr ExtractSingleElementAsFloat(ElementsAttr attr) { if (attr.getShapedType().getNumElements() != 1 || !mlir::isa<FloatType>(attr.getShapedType().getElementType())) { return {}; } return attr.getSplatValue<FloatAttr>(); } FloatAttr GetSingleElementAsFloatOrSelf(Attribute attr) { if (auto m = mlir::dyn_cast_or_null<ElementsAttr>(attr)) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 1.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/common/ir/QuantOps.cc
return quantizedType.isCompatibleExpressedType(expressed); if (auto tensorType = mlir::dyn_cast<TensorType>(expressed)) return spec == tensorType.getElementType(); if (auto vectorType = mlir::dyn_cast<VectorType>(expressed)) return spec == vectorType.getElementType(); } return false; } LogicalResult QuantizeRegionOp::verify() { // There are specifications for both inputs and outputs.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/quantization/ir/QuantOps.cc
return quantizedType.isCompatibleExpressedType(expressed); if (auto tensorType = mlir::dyn_cast<TensorType>(expressed)) return spec == tensorType.getElementType(); if (auto vectorType = mlir::dyn_cast<VectorType>(expressed)) return spec == vectorType.getElementType(); } return false; } LogicalResult QuantizeRegionOp::verify() { // There are specifications for both inputs and outputs.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/constant_utils.cc
#include "tsl/platform/statusor.h" namespace mlir { namespace TFL { absl::StatusOr<TypedAttr> CreateTypedAttr(ShapedType shaped_type, int value) { Type element_type = shaped_type.getElementType(); if (element_type.isF16()) { auto floatType = mlir::FloatType::getF16(element_type.getContext()); auto floatAttr = mlir::FloatAttr::get(floatType, static_cast<float>(value));
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/transforms/reduce_type_precision.cc
auto const_type = mlir::dyn_cast<ShapedType>(op.getOperand(0).getType()); auto result_type = mlir::dyn_cast<ShapedType>(op.getResult().getType()); if (!const_type || !const_type.getElementType().isSignlessInteger(4) || !result_type || !result_type.getElementType().isSignlessInteger(8)) { return failure(); } auto input_op = dyn_cast<arith::ConstantOp>(op.getOperand(0).getDefiningOp()); if (!input_op) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/constant_fold.cc
// Ignore types with undefined bit widths. if (!tensor_type.getElementType().isIntOrFloat()) continue; if (!tensor_type.hasStaticShape()) { has_unknown_shape = true; return size; } size += tensor_type.getNumElements() * tensor_type.getElementType().getIntOrFloatBitWidth(); } return size; };
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/validators.h
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; return tensorType.getElementType().isBF16(); } // Returns true iff the given value is a f16 tensor.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 4.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/rewrite_util.h
IntegerAttr attr = IntegerAttr::get(int_ty, raw_value); 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()) {
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/utils/convert_type.cc
return tflite::TensorType_STRING; } else if (auto complex_type = mlir::dyn_cast<mlir::ComplexType>(type)) { if (complex_type.getElementType().isF32()) { return tflite::TensorType_COMPLEX64; } else if (complex_type.getElementType().isF64()) { return tflite::TensorType_COMPLEX128; } llvm_unreachable("invalid complex Type in conversion");
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 07 23:04:40 UTC 2024 - 8.2K bytes - Viewed (0)