- Sort Score
- Result 10 results
- Languages All
Results 81 - 90 of 113 for ShapedType (0.55 sec)
-
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) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/lift_quantizable_spots_as_functions_drq.cc
// This op is guaranteed to be a constant as ODS checks IsConstTensor. // Check if the number of elements meets the requirement. int current_num_elements = mlir::cast<ShapedType>(call_op.getOperand(idx).getType()) .getNumElements(); if (current_num_elements < min_num_elements_for_weights_) { call_op.emitRemark("Quantization is skipped for ")
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 8.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/utils/xla_sharding_util.cc
// known. mlir::Type output_type; auto input_type = mlir::cast<mlir::TensorType>(src_input.getType()); if (input_type.hasRank()) { if (input_type.getShape()[split_dimension] == mlir::ShapedType::kDynamic) { output_type = input_type; } else { auto shape = llvm::to_vector<4>(input_type.getShape()); if (shape[split_dimension] % num_split != 0) { return mlir::emitError(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 22 21:28:13 UTC 2024 - 34K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/transforms/tf2xla_rewriter.cc
if (!encoding) return false; for (int i = 0; i < ranked_ty.getRank(); ++i) { if (ranked_ty.isDynamicDim(i) && encoding.getBounds()[i] == ShapedType::kDynamic) { return false; } } return true; } bool HasSymbolRefAttr(Operation* op) { for (const auto& attr : op->getAttrs()) { Attribute attr_value = attr.getValue();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 02 09:16:07 UTC 2024 - 18.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/utils/export_utils.cc
AttrValue attr_val; // For type attributes, we only propagate the element type. mlir::Type elt_type = attr.getValue(); if (auto shaped_type = mlir::dyn_cast<mlir::ShapedType>(elt_type)) { elt_type = shaped_type.getElementType(); } TF_RETURN_IF_ERROR( ConvertAttribute(elt_type, remove_ref_type, &attr_val)); list->add_type(attr_val.type());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 17 17:58:54 UTC 2024 - 19.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/convert_func_to_bfloat16.cc
values->end()); state.attributes.set( const_op.getValueAttrName(), DenseFPElementsAttr::get( mlir::dyn_cast<ShapedType>(const_op.getValue().getType()) .clone(rewriter.getBF16Type()), bfloat16_values)); } rewriter.replaceOp(op, rewriter.create(state)->getResults());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 9.3K bytes - Viewed (0)