- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 109 for getRank (0.14 sec)
-
tensorflow/compiler/mlir/quantization/tensorflow/utils/fake_quant_utils.h
tf_op.emitError("The input should have known rank for per-channel op."); return failure(); } // This is a special case that the quant_dim is the last dimensions. quant_dim = input_type.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. rewriter.setInsertionPointAfter(tf_op.getOperation());
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/quantization/tensorflow/tf_to_quant.cc
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. rewriter.setInsertionPointAfter(tf_op.getOperation());
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/tensorflow/transforms/lift_variables.cc
func, arg_number, symbol_table); if (!global_tensor) continue; auto arg_type = mlir::cast<RankedTensorType>(arg.getType()); assert(arg_type.getRank() == 0); llvm::ArrayRef<TensorType> underlying_type = mlir::cast<TF::ResourceType>(arg_type.getElementType()).getSubtypes(); // If the arg type already matches the global_tensor type, we don't need
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 23 09:05:47 UTC 2024 - 7.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/einsum.cc
if (std::isalpha(label)) { new_lhs.push_back(label); } else { // Encounter ellipsis: generate unnamed labels then insert to the new // labels. new_labels = GenerateLabels(lhs_ty.getRank() - lhs_named_label_count, available_labels); new_lhs.append(new_labels); i += 2; } } std::string new_rhs, new_rhs_labels;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 33.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/nms_utils.cc
auto boxes_type = mlir::dyn_cast<RankedTensorType>(func_.getFunctionType().getInput(0)); if (boxes_type == nullptr || !boxes_type.hasRank() || boxes_type.getRank() != 2) { return func_.emitWarning() << "TFLite does not support batched input for " "non_max_suppression_padded"; } return success(); }
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/lite/ir/tfl_ops.td
").getType().cast<ShapedType>().getRank() >= " # m>]>>; class TFL_OperandHasRankRange<int n, int x, int y> : PredOpTrait<"operand " # n # " has rank range [" # x # ", " # y # "]", Or<[TFL_OperandIsUnrankedPred<n>, CPred<"$_op.getOperand(" # n # ").getType().cast<ShapedType>().getRank() " ">= " # x # " && $_op.getOperand(" # n # ").getType().cast<ShapedType>()." "getRank() <= " # y>]>>;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Jun 06 19:09:08 UTC 2024 - 186K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/functional_control_flow_to_regions.cc
// Converts the condition for an IfOp/WhileOp to a boolean value. Value ConvertConditionToBoolean(Operation* op, Value cond) { if (auto ranked_type = mlir::dyn_cast<RankedTensorType>(cond.getType())) if (ranked_type.getRank() == 0 && ranked_type.getElementType().isSignlessInteger(1)) return cond; OpBuilder builder(op); Value to_bool = builder.create<TF::ToBoolOp>(op->getLoc(), cond);
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/tf2xla/transforms/legalize_tf_patterns.td
"GetHLOAxisFromTFAxis(" "$0, $1.getType().cast<RankedTensorType>().getRank(), &$_builder)">; // Same as the above but with $1 of type operand_range from variadic TensorFlow // input. def GetHLOAxisFromTFAxisVariadic : NativeCodeCall< "GetHLOAxisFromTFAxis(" "$0, (*$1.begin()).getType().cast<RankedTensorType>().getRank(), " "&$_builder)">; def CastElementsToI64Elements : NativeCodeCall<
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon May 06 18:46:23 UTC 2024 - 34.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/legalize_patterns.td
(TFL_TopKV2Op $input, $k)>; def ReductionDimensionIsLastDim : Constraint<CPred<"($0.cast<IntegerAttr>().getInt() == " "$1.getType().cast<ShapedType>().getRank() - 1 || $0.cast<IntegerAttr>().getInt() == -1)">>; // Legalizes TF_ApproxTopKOp to TFL_TopKV2Op with the following constraints: // 1. It computes max k // 2. The reduction dimension is the last dim of the input.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Jun 04 13:30:42 UTC 2024 - 28.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/common/attrs_and_constraints.h
// `ShapedType` or its rank is unknown. inline bool HasRankOf(Value value, const int64_t rank) { auto shaped_type = mlir::dyn_cast_or_null<ShapedType>(value.getType()); return shaped_type && shaped_type.hasRank() && shaped_type.getRank() == rank; } // Creates a new type that has the shape from the `old_type` and the element // type from the `element_type`. Type CloneTypeWithNewElementType(Type old_type, Type element_type);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 9.9K bytes - Viewed (0)