- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 86 for GetShape (0.13 sec)
-
tensorflow/compiler/mlir/lite/utils/lstm_utils_test.cc
auto output_types = fused_lstm_func_.getFunctionType().getResults(); SmallVector<int64_t, 2> output_shape{1, mlir::ShapedType::kDynamic}; EXPECT_EQ(mlir::cast<RankedTensorType>(output_types[0]).getShape().size(), output_shape.size()); for (int i = 0; i < output_shape.size(); i++) { EXPECT_EQ(mlir::cast<RankedTensorType>(output_types[0]).getDimSize(i), output_shape[i]); } }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 10K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/utils/tf_to_xla_attribute_utils.cc
Value temp_padding = CreateConstValue<int32_t>(builder, loc, {num_dims, 2}, padding_values); SmallVector<int64_t> output_shape(input_shape.getShape().begin(), input_shape.getShape().end()); for (int i : spatial_dims) { output_shape[i] += padding_values[2 * i] + padding_values[2 * i + 1]; } return builder.create<TF::PadV2Op>(
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/lite/transforms/optimize_batch_matmul.cc
bmm_op->getLoc(), permuation_tensor_type, DenseElementsAttr::get(permuation_tensor_type, permute)); auto input_shape = input_type.getShape(); llvm::SmallVector<int64_t, 4> permuted_shape(input_shape.begin(), input_shape.end()); // Swaps z dimension and x dimension to get permuted shape.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 9.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/utils/export_utils.h
// ShapeContainerT is any type with the following methods: // bool hasRank() // ArrayRef<int64_t> getShape() // This includes mlir::TF::ShapeAttr and mlir::ShapedType. template <typename ShapeContainerT> void SetTensorShapeProto(ShapeContainerT shape, TensorShapeProto* proto) { if (shape.hasRank()) { for (int64_t dim : shape.getShape()) { proto->add_dim()->set_size(mlir::ShapedType::isDynamic(dim) ? -1 : dim); } } else {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Apr 26 09:37:10 UTC 2024 - 3.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/einsum.cc
rhs_shape.reserve(dnums.lhs_rhs_out.size() + 2); for (auto i : dnums.lhs_rhs_out) { const int64_t b1 = lhs_type.getShape()[std::get<0>(i)]; lhs_shape.push_back(b1); const int64_t b2 = rhs_type.getShape()[std::get<1>(i)]; rhs_shape.push_back(b2); lhs_reshape_segids.at(std::get<0>(i)) = num_lhs_reshape_segids++;
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/tensorflow/transforms/tpu_space_to_depth_pass.cc
LogicalResult HandlePad(TF::PadOp op, int32_t kernel_size, int32_t block_size) { auto ranked_type = mlir::dyn_cast<RankedTensorType>(op.getInput().getType()); if (!ranked_type) return failure(); auto pad_input_shape = ranked_type.getShape(); Location loc = op.getLoc(); OpBuilder builder(op); builder.setInsertionPoint(op); auto padding_type = RankedTensorType::get({4, 2}, builder.getIntegerType(32)); // Calculate paddings.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 29.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/ir/tf_arith_ops_folder.h
return operand_ty == result_ty && identity_ty.hasStaticShape() && result_ty.hasStaticShape() && OpTrait::util::staticallyKnownBroadcastable(operand_ty.getShape(), identity_ty.getShape()); }; // Check that we have a constant operand on one side (candidate for identity). const bool is_commutative =
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/tensorflow/transforms/lower_tf.cc
if (!input_ty.hasRank() || input_ty.getRank() != 4) { return failure(); } int64_t batch_cst = input_ty.getShape()[0]; int64_t channels_cst = input_ty.getShape()[3]; int64_t in_y_cst = input_ty.getShape()[1]; int64_t in_x_cst = input_ty.getShape()[2]; int64_t in_spatial_cst = in_y_cst < 0 || in_x_cst < 0 ? -1 : in_y_cst * in_x_cst;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 74.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo.cc
// Reshape input image to add a new spatial dimension. auto image_type = mlir::cast<ShapedType>(conv_op.getLhs().getType()); SmallVector<int64_t, 4> image_2d_shape(image_type.getShape().begin(), image_type.getShape().end()); image_2d_shape.push_back(1); auto image_2d_type = RankedTensorType::get(image_2d_shape, image_type.getElementType()); auto loc = conv_op.getLoc();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 154.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/post_quantize.cc
const int num_dimensions = input_tensor.getShapedType().getRank(); assert(perm_tensor.getType().getNumElements() == num_dimensions); ArrayRef<int64_t> input_shape = input_tensor.getShapedType().getShape(); auto output_type = mlir::cast<ShapedType>(op.getOutput().getType()); SmallVector<int32_t, 4> perm; SmallVector<int64_t, 4> output_shape; for (int i = 0; i < num_dimensions; ++i) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 17.1K bytes - Viewed (0)