- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 22 for getStorageType (0.22 sec)
-
tensorflow/compiler/mlir/lite/quantization/ir/QuantizeUtils.cc
if (mlir::isa<FloatAttr>(origRealValue)) { FloatAttr floatAttr = mlir::cast<FloatAttr>(origRealValue); outConvertedType = quantizedElementType.getStorageType(); return IntegerAttr::get(quantizedElementType.getStorageType(), converter.quantizeFloatToInt(floatAttr.getValue())); } return nullptr; } /// Converts a real expressed DenseFPElementsAttr to a corresponding
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/common/uniform_quantized_types_test.cc
/*scale=*/1.0, /*zero_point=*/0); // Storage type of `i8` is currently verifiable as `unsigned` in `Types.cpp`. EXPECT_TRUE(quantized_type.getStorageType().isSignlessInteger(8)); } TEST_F(CreateI8F32UniformQuantizedTypeTest, F32ExpressedTypeSucceeds) { 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/quantization/tensorflow/passes/prepare_lifting.cc
if (multiplier_attr.isSplat()) { double new_scale = multiplier_array.front() * uniform_type.getScale(); new_qtype = UniformQuantizedType::get( uniform_type.getFlags(), uniform_type.getStorageType(), uniform_type.getExpressedType(), new_scale, uniform_type.getZeroPoint(), uniform_type.getStorageTypeMin(), uniform_type.getStorageTypeMax()); } else { auto new_scales =
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 17 17:58:54 UTC 2024 - 13.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.cc
llvm::equal(expected_per_axis_qtype.getZeroPoints(), compared_per_axis_qtype.getZeroPoints()) && expected_params.getStorageType() == compared_params.getStorageType() && expected_params.getExpressedType() == compared_params.getExpressedType()) { continue; } }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 08 02:10:16 UTC 2024 - 43.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/common/uniform_quantized_types.cc
} bool IsStorageTypeI8(const QuantizedType quantized_type) { const Type storage_type = quantized_type.getStorageType(); return storage_type.isInteger(/*width=*/8); } bool IsStorageTypeI32(const QuantizedType quantized_type) { const Type storage_type = quantized_type.getStorageType(); return storage_type.isInteger(/*width=*/32); } bool IsExpressedTypeF32(const QuantizedType quantized_type) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 8.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/common/ir/UniformSupport.h
uniform_type.getStorageTypeIntegralWidth(), uniform_type.isSigned()) { assert(isa<FloatType>(uniform_type.getExpressedType())); assert(uniform_type.getStorageType().isSignlessInteger()); } UniformQuantizedValueConverter(double scale, double zero_point, double clamp_min, double clamp_max,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 08 02:10:16 UTC 2024 - 9.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/convert_tf_quant_ops_to_mhlo.cc
rewriter.replaceOpWithNewOp<mhlo::BitcastConvertOp>( op, output_type->clone( mlir::dyn_cast<quant::QuantizedType>(output_type->getElementType()) .getStorageType()), result); return success(); } }; // UniformDequantizeOp takes TF quantized types as input which would have been
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 17 17:58:54 UTC 2024 - 30.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/op_stat_pass.cc
auto uniform_quantized_dtype = mlir::dyn_cast_or_null<UniformQuantizedType>( operand_or_result) .getStorageType(); dtype = absl::StrCat( "uq_", uniform_quantized_dtype.getIntOrFloatBitWidth()); }) .Case<quant::UniformQuantizedPerAxisType>([&](Type) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 8.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/modify_io_nodes.cc
auto quantize_output = quantize_op.getOutput(); auto current_type = quant::QuantizedType::getQuantizedElementType( quantize_output.getType()) .getStorageType(); if (current_type == input_type) { // int8 == int8 arg_type = quantize_output.getType(); new_arg = block.addArgument(arg_type, loc); quantize_output.replaceAllUsesWith(new_arg);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 8.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/const_tensor_utils.cc
if (auto qtype = mlir::dyn_cast<QuantizedType>(element_ty)) { mlir::RankedTensorType new_type = tensorflow::GetTypeFromTFTensorShape( type.getShape(), qtype.getStorageType()); return DenseElementsAttr::get( new_type, builder.getIntegerAttr(qtype.getStorageType(), unique_index)); } llvm_unreachable("unhandled element type"); } StatusOr<mlir::ElementsAttr> ConvertIntBuffer(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 07 23:04:40 UTC 2024 - 16.6K bytes - Viewed (0)