- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 24 for getStorageType (0.29 sec)
-
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) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize.cc
auto qtype = dq_arg_type.getElementType().cast<QuantizedType>(); auto scast_op = rewriter.create<quantfork::StorageCastOp>( dq_op->getLoc(), dq_arg_type.clone(qtype.getStorageType()), dq_op.getArg()); inputs.push_back(scast_op.getResult()); } else if (!elem_type.isF32()) { // If the operand is an integer tensor, then it doesn't require the
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Mar 22 05:52:39 UTC 2024 - 23.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/post_quantize.cc
auto values_type = RankedTensorType::get( output_shape, mlir::cast<quant::UniformQuantizedType>(output_type.getElementType()) .getStorageType()); rewriter.replaceOpWithNewOp<QConstOp>( op, TypeAttr::get(result_type), DenseIntElementsAttr::get(values_type, new_values)); return success(); } };
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 17.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_driver.cc
static_cast<double>(bias_half_range) / kBiasMax; changed |= SetOperandParams( op, bias_index, UniformQuantizedType::getChecked( bias_op->getLoc(), params.getFlags(), params.getStorageType(), params.getExpressedType(), new_bias_scale, 0, params.getStorageTypeMin(), params.getStorageTypeMax())); arith::ConstantOp filter_op = DuplicateConstantOpIfNeeded(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 38.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_composite_functions.cc
"Failed to convert the type to the corresponding qtype."); return failure(); } output_types = {new_output_type}; } else { output_types = {output_type.clone(elem_type.getStorageType())}; } SmallVector<Value> args = {q_op.getArg(), scale, zero_point}; FlatSymbolRefAttr func_name = FlatSymbolRefAttr::get(rewriter.getStringAttr(kQuantizeFuncName));
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 54.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/quantization/device_target.cc
KernelSpecs::Signature* signature) { if (auto quant = spec.dyn_cast_or_null<UniformQuantizedType>()) { signature->push_back(AnyQuantizedType::get( quant.getFlags(), quant.getStorageType(), quant.getExpressedType(), quant.getStorageTypeMin(), quant.getStorageTypeMax())); } else if (auto any = spec.dyn_cast_or_null<AnyQuantizedType>()) { signature->push_back(any); } else { // float
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Mar 08 10:41:08 UTC 2024 - 7.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/ops/tf_quantize_op.cc
if (!tensor_proto_attr) { return nullptr; } Type storage_type = mlir::cast<QuantizedType>(shaped_quantized_type.getElementType()) .getStorageType(); ShapedType new_type = shaped_quantized_type.clone(storage_type); rewriter.setInsertionPointAfter(op); auto const_op = rewriter.create<TF::ConstOp>(op.getLoc(), new_type, tensor_proto_attr);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.h
QType new_qtype; if (auto uqtype = qtype.template dyn_cast<quant::UniformQuantizedType>()) { new_qtype = quant::UniformQuantizedType::getChecked( op.getLoc(), flags, qtype.getStorageType(), qtype.getExpressedType(), uqtype.getScale(), uqtype.getZeroPoint() - offset, uqtype.getStorageTypeMin() - offset, uqtype.getStorageTypeMax() - offset);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Apr 24 20:30:06 UTC 2024 - 41.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/prepare_quantize_helper.h
quant::GetUniformQuantizedTypeForBias( quant_params, legacy_float_scale, adjusted_quant_dim))) { return quant::UniformQuantizedType::get( qtype.getFlags(), qtype.getStorageType(), qtype.getExpressedType(), qtype.getScale() * scale, qtype.getZeroPoint(), qtype.getStorageTypeMin(), qtype.getStorageTypeMax()); } return {}; }; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 03 18:01:23 UTC 2024 - 28K bytes - Viewed (0)