- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 72 for getElementDtype (0.21 sec)
-
tensorflow/compiler/mlir/quantization/common/uniform_quantized_types.h
bool IsExpressedTypeF32(QuantizedType quantized_type); // Given a value, extract the `ElementType`. // `value` should be a non-null `TensorType`. inline Type GetElementType(const Value value) { return mlir::cast<TensorType>(value.getType()).getElementType(); } // Returns true iff `type` is a uniform quantized type whose storage type is // 8-bit integer and expressed type is f32. bool IsI8F32UniformQuantizedType(Type type);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/reduce.h
Value iota = reduce_op.getInputs().back(); if (!MatchIota(reduce_op.getDimensions(), iota)) return failure(); // Match the reduction computation. const bool is_float = mlir::isa<FloatType>(operand_init.getElementType()); if (failed(MatchReduceToArgMinMaxType1(reduce_op, is_float, is_argmax)) && failed(MatchReduceToArgMinMaxType2(reduce_op, is_argmax))) return rewriter.notifyMatchFailure(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/tflite_legalize_hlo.cc
public: using ConvertReduceOpToArgMinMax::ConvertReduceOpToArgMinMax; bool IsValueInitValue(const DenseElementsAttr& attr) const override { auto element_type = attr.getType().getElementType(); if (attr.getNumElements() != 1 || !element_type.isIntOrFloat()) return false; if (mlir::isa<FloatType>(element_type)) { auto value = *attr.value_begin<APFloat>();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/utils/tf_quantize_op_utils.cc
UnrankedTensorType CreateUnknownShapeFromElementType(Type tensor_type) { if (!mlir::cast<TensorType>(tensor_type)) return UnrankedTensorType(); return UnrankedTensorType::get( mlir::cast<TensorType>(tensor_type).getElementType()); } } // namespace quant
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 1.2K bytes - Viewed (0) -
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) -
tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_traits.h
QuantizedType GetResultQuantizedType(int index) { auto op = this->getOperation(); const auto result_type = op->getResult(index).getType().template cast<ShapedType>(); if (!result_type.getElementType().template isa<FloatType>()) return {}; Builder builder(op->getContext()); const IntegerType storage_type = builder.getIntegerType(BitWidth); const double scale = static_cast<double>(ScaleMantissa) *
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Mar 05 07:39:40 UTC 2024 - 5.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/experimental/tac/transforms/fold_constants_to_subgraph.cc
// arith ConstOp path. auto type = mlir::cast<ShapedType>(arith_const_op.getType()).getElementType(); if (!type.isInteger(32) && !type.isInteger(64)) return false; } else if (auto const_op = dyn_cast_or_null<TFL::ConstOp>(op)) { // ConstOp path. auto type = mlir::cast<ShapedType>(const_op.getType()).getElementType(); if (!type.isInteger(32) && !type.isInteger(64)) return false; } else { // QConstOp path.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/utils/bfloat16_type.cc
return isa<FloatType>(type) && type.getIntOrFloatBitWidth() > 16; } Type ToBfloat16Type(Type type) { if (auto shaped = mlir::dyn_cast<ShapedType>(type)) { const Type elem = shaped.getElementType(); if (IsLargeFloatType(elem)) { return shaped.clone(BFloat16Type::get(type.getContext())); } } else if (IsLargeFloatType(type)) { return BFloat16Type::get(type.getContext()); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 1.6K bytes - Viewed (0) -
subprojects/core/src/main/java/org/gradle/api/internal/collections/SortedSetElementSource.java
// TODO: We likely want to also immediately realize ChangingValue providers in the // onValueChange callback above. if (subscriptionVerifier.isSubscribed(provider.getElementType())) { realize(Collections.singleton(collector)); // Ugly backwards-compatibility hack. Previous implementations would notify listeners without
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Mon Dec 11 13:37:56 UTC 2023 - 8.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/utils/convert_type.cc
absl::StrCat("Converting ", debugString(type), " to DataType")); } } else if (auto complex_type = mlir::dyn_cast<mlir::ComplexType>(type)) { auto etype = complex_type.getElementType(); if (etype.isF32()) { *dtype = DT_COMPLEX64; return absl::OkStatus(); } else if (etype.isF64()) { *dtype = DT_COMPLEX128; return absl::OkStatus(); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Apr 26 09:37:10 UTC 2024 - 7.5K bytes - Viewed (0)