- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 79 for getRank (0.16 sec)
-
tensorflow/compiler/mlir/quantization/tensorflow/utils/tf_to_xla_attribute_utils.cc
// packed_value = bitwise_or(packed_low, packed_high) Value PackOperand(OpBuilder &builder, Location loc, Value value, int pack_dim) { ShapedType value_type = mlir::cast<ShapedType>(value.getType()); const int rank = value_type.getRank(); SmallVector<int64_t> packed_shape(value_type.getShape().begin(), value_type.getShape().end()); RankedTensorType shape_type =
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/tensorflow/ir/tf_op_base.td
CPred<"$_op.getOperand(" # n # ").getType().cast<ShapedType>().getRank() == " # m>]>>; // Returns true if the n-th result has unknown rank or has rank m. class TF_ResultHasRank<int n, int m> : PredOpTrait<"result " # n # " is " # m # "-D", Or<[TF_ResultIsUnrankedPred<n>, CPred<"$_op.getResult(" # n # ").getType().cast<ShapedType>().getRank() == " # m>]>>;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Oct 30 06:52:55 UTC 2023 - 30.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/utils/tf_to_uniform_attribute_utils.cc
auto output_scale_type = mlir::dyn_cast<ShapedType>(op->getOperand(3).getType()); if (!output_scale_type) { return failure(); } if (output_scale_type.hasRank() && 0 < output_scale_type.getRank()) { output_quantization_axis = activation_quantization_axis; } } // For per-axis -> per-axis requantization, input and output quantization // axis must be equal.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 18.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/quantization/tensorflow/fallback_to_flex_ops.cc
} // Returns true if the rank of the value equals to the given rank. bool RankEquals(Value value, int rank) { auto rank_type = mlir::dyn_cast<RankedTensorType>(value.getType()); return (rank_type && rank_type.getRank() == rank); } #include "tensorflow/compiler/mlir/lite/quantization/tensorflow/fallback_to_flex_patterns.inc" void FallbackToFlexOps::runOnOperation() { if (mode_.empty()) return;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 12.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/collection_ops_util.cc
auto per_slice_shape = llvm::to_vector<8>(buffer_type.getShape()); per_slice_shape[0] = 1; auto slice_sizes = GetR1Const(per_slice_shape, builder, loc); llvm::SmallVector<int64_t, 8> starts_in_update(buffer_type.getRank(), 0); for (int64_t i = 0; i < updates_type.getDimSize(0); ++i) { auto index = builder.create<TF::SliceOp>( loc, ArrayRef<Type>{GetSizeType(builder)},
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 14.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/api/v1/compile_mlir_util.cc
// neither. mlir::RankedTensorType GetBufferType(mlir::Type ty) { auto ranked_ty = mlir::dyn_cast_or_null<mlir::RankedTensorType>(ty); if (!ranked_ty) return {}; int64_t rank = ranked_ty.getRank(); llvm::SmallVector<int64_t, 4> dims = llvm::to_vector<4>(ranked_ty.getShape()); auto encoding = mlir::dyn_cast_or_null<mlir::mhlo::TypeExtensionsAttr>( ranked_ty.getEncoding());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 21 17:24:39 UTC 2024 - 45.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/transforms/tf2xla_rewriter.cc
if (ranked_ty.hasStaticShape()) return true; auto encoding = mlir::dyn_cast_or_null<TypeExtensionsAttr>(ranked_ty.getEncoding()); 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) {
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/lite/transforms/dilated_conv.h
} // Allow dynamic width and height dimensions only. auto result_ty = mlir::cast<TensorType>(op.getResult().getType()); if (!result_ty.hasRank() || result_ty.getRank() != 4 || result_ty.isDynamicDim(0) || result_ty.isDynamicDim(3)) { return rewriter.notifyMatchFailure( op, "only dynamic width and height dimensions are allowed"); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 20K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/internal/passes/tpu_sharding_identification_pass.cc
// verify shardings that actually break a tensor apart. return mlir::success(); } if (RankedTensorType ranked_type = mlir::dyn_cast<RankedTensorType>(type)) { const int64_t tensor_rank = ranked_type.getRank(); int tile_assignment_rank = sharding->tile_assignment_dimensions_size(); // When a tensor is partial or subgroup tiled, its tile assignment will
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Apr 30 02:01:13 UTC 2024 - 28.9K 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) { const QuantState& non_bias_state =
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 38.1K bytes - Viewed (0)