- Sort Score
- Result 10 results
- Languages All
Results 81 - 90 of 119 for ShapedType (0.12 sec)
-
tensorflow/compiler/mlir/quantization/tensorflow/ops/tf_op_quant_spec.cc
return (isa<TF::XlaConvV2Op, TF::XlaDotV2Op, TF::XlaGatherOp, TF::GatherOp, TF::GatherV2Op>(op)); } 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; }
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/lite/transforms/prepare_tf.cc
// destination type is not inferred and must be given explicitly. // // Preconditions: The given value must have a ShapedType. static Value CreateTFCastOpI32(OpBuilder *builder, Location loc, Value x, BoolAttr truncate) { auto x_type = mlir::dyn_cast_or_null<ShapedType>(x.getType()); if (!x_type) llvm_unreachable("unsupported type"); Type type = x_type.clone(builder->getI32Type());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 28 21:49:50 UTC 2024 - 64.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/experimental/tac/transforms/cost_model.cc
if (IsQUI8Type(input_type) || IsQI8Type(input_type)) { total_size_transferred += input_type.getNumElements() * 8; } else { auto s_type = mlir::cast<ShapedType>(input_type); total_size_transferred += s_type.getNumElements() * s_type.getElementTypeBitWidth(); } } } return total_size_transferred; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 7.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/utils/fake_quant_utils.h
if (!fetch_min_max_(tf_op, min_value, max_value)) { return failure(); } Value input = tf_op.getInputs(); int quant_dim = -1; auto input_type = mlir::cast<ShapedType>(input.getType()); if (PerAxis) { if (!input_type.hasRank()) { tf_op.emitError("The input should have known rank for per-channel op."); return failure(); }
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/lite/transforms/prepare_quantize.cc
}; bool need_to_set_input_nodes_quantization_params = false; for (const BlockArgument arg : func.getArguments()) { auto shaped = mlir::dyn_cast<ShapedType>(arg.getType()); if (shaped && mlir::isa<FloatType>(shaped.getElementType()) && !has_quantize_op(arg)) { need_to_set_input_nodes_quantization_params = true; break; } }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 17.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_driver.cc
if (bias_op != nullptr) { Type bias_type = bias_op->getResult(0).getType(); if (bias_type != builder_.getNoneType()) { const int bias_rank = mlir::dyn_cast<ShapedType>(bias_type).getRank(); adjusted_quant_dim = bias_rank > 1 ? bias_rank - 1 : 0; } } } for (const int non_bias_operand_index : non_bias_operand_indices) {
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/lite/experimental/tac/transforms/device_transform_patterns.cc
auto input_type = mlir::dyn_cast_or_null<ShapedType>(input.getType()); if (!input_type) return failure(); // Only need to do this for quantized input. auto input_quantized_type = quant::QuantizedType::getQuantizedElementType(input_type); if (!input_quantized_type) return failure(); auto output = mean_op.getOutput(); auto output_type = mlir::dyn_cast_or_null<ShapedType>(output.getType());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 25.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/convert_type.cc
} } mlir::Type GetShapeStrippedType(mlir::TypeAttr type_attr) { auto type = type_attr.getValue(); auto shaped_type = mlir::dyn_cast<mlir::ShapedType>(type); if (shaped_type) { return shaped_type.getElementType(); } else { return type; } } bool NotFromQuantOpOrSameQuantType(mlir::Value val, mlir::TypeAttr qtype_attr) {
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/quantization/tensorflow/tf_to_quant.cc
int quant_dim = -1; if (PerAxis) { // This is a special case that the quant_dim is the last dimensions // according to the tf.FakeQuantWithMinMaxPerChannel. quant_dim = mlir::cast<ShapedType>(res.getType()).getRank() - 1; } // Use the min/max from the operands and the num_bits and narrow_range // attribute to create the quantization parameter for the new quantize op.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 8.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_quantize.cc
}; bool need_to_set_input_nodes_quantization_params = false; for (const BlockArgument arg : func.getArguments()) { auto shaped = mlir::dyn_cast<ShapedType>(arg.getType()); if (shaped && mlir::isa<FloatType>(shaped.getElementType()) && !has_quantize_op(arg)) { need_to_set_input_nodes_quantization_params = true; break; } }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 17.2K bytes - Viewed (0)