- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 44 for getRank (0.17 sec)
-
tensorflow/compiler/mlir/tensorflow/ir/tf_ops_tensor_helper.h
return type && type.getRank() == rank && mlir::isa<FloatType>(type.getElementType()); } // Returns true if the given `value` has the specified rank or has unranked // type. inline bool IsOfRankOrUnranked(Value value, int64_t rank) { RankedTensorType type = GetRankedTensorTypeForOperand(value); return !type || type.getRank() == rank; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 3.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/ir/tf_arith_ops_folder.cc
if (!dims_type) return success(); if (dims_type.getRank() > 1) return emitError(loc, "dimensions can only be 0D or 1D tensor"); auto input_type = mlir::dyn_cast<RankedTensorType>(input.getType()); if (!input_type) return success(); int64_t rank = input_type.getRank(); DenseIntElementsAttr dims_attr; if (!matchPattern(dims, m_Constant(&dims_attr))) return success();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 3K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/common/attrs_and_constraints.cc
const int64_t input_rank = mlir::dyn_cast<ShapedType>(dot_general_op.getOperand(0).getType()) .getRank(); const int64_t filter_rank = mlir::dyn_cast<ShapedType>(dot_general_op.getOperand(1).getType()) .getRank(); // The following conditions are such requirements: // - rank(lhs) is 1 or 2 // - rank(rhs) = 2 // - size(lhs_contracting_dimensions) = 1
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/perception_ops_utils.cc
if (!image_type || !image_type.getElementType().isF32() || image_type.getRank() != 4) { return func_.emitWarning() << "Image should be a 4D float tensor"; } auto flow_type = mlir::dyn_cast_or_null<RankedTensorType>( func_.getFunctionType().getInput(1)); if (!flow_type || !flow_type.getElementType().isF32() || flow_type.getRank() != 4) { return func_.emitWarning() << "Flow should be a 4D float tensor";
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 17 17:58:54 UTC 2024 - 8.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/common/ir/QuantOps.cc
if (!mlir::isa<FloatType>(layerStatsType.getElementType())) { return emitOpError("layerStats must have a floating point element type"); } if (layerStatsType.getRank() != 1 || layerStatsType.getDimSize(0) != 2) { return emitOpError("layerStats must have shape [2]"); } } // Verify axisStats (optional) attribute. if (getAxisStats()) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/quantization/ir/QuantOps.cc
if (!mlir::isa<FloatType>(layerStatsType.getElementType())) { return emitOpError("layerStats must have a floating point element type"); } if (layerStatsType.getRank() != 1 || layerStatsType.getDimSize(0) != 2) { return emitOpError("layerStats must have shape [2]"); } } // Verify axisStats (optional) attribute. if (getAxisStats()) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_with_tf2xla.cc
// If the original type doesn't have a rank, then refine as the updated type // has a rank. if (!original.hasRank()) return true; // Both types must have the same rank. if (original.getRank() != updated.getRank()) return false; // Refine if the updated type is bounded. return IsBounded(updated); } // Propagates more refined type by cloning op using the new operands. This
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 28 21:49:50 UTC 2024 - 9.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/ir/tf_ops_tensor_helper.cc
// Output type is unranked if input type is not ranked. auto ranked_ty = mlir::dyn_cast<RankedTensorType>(input_ty); if (!ranked_ty) return UnrankedTensorType::get(element_ty); int64_t rank = ranked_ty.getRank(); DenseIntElementsAttr indices; if (!matchPattern(reduction_indices, m_Constant(&indices))) { // Output type is unranked if reduction indices are not constant and reduced // dimensions are not kept.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/arithmetic_count_util.h
mlir::dyn_cast_or_null<mlir::RankedTensorType>(output.getType()); if (output_type == nullptr || !output_type.hasStaticShape()) return false; int64_t cols = 1; for (int i = 0; i < output_type.getRank() - 1; ++i) { cols *= output_type.getDimSize(i); } const int64_t cost_per_col = 2 * weight_type.getNumElements(); *count = cost_per_col * cols; auto bias = op->getOperand(2);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 3.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/optimize_batch_matmul.cc
// Input rhs must be a constant with rank 2. if (constant.getType().getRank() != 2) return failure(); // Create a tfl.transpose op that performs ZX transpose on `input`. auto create_z_x_transpose_op = [&](Value input) -> Value { RankedTensorType input_type = mlir::cast<RankedTensorType>(input.getType()); const int input_rank = input_type.getRank();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 9.6K bytes - Viewed (0)