- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 46 for get_shape (0.19 sec)
-
tensorflow/compiler/mlir/tfr/ir/tfr_ops.td
} }]; let hasCanonicalizer = 1; } def TFR_GetShapeOp : TFR_Op<"get_shape", [Pure]> { let description = [{ The `get_shape` operation gets the shape of a tfr.tensor and returns !shape.shape type. Example: ```mlir %1 = "tfr.get_shape"(%0) : !tfr.tensor -> !shape.shape %1 = tfr.get_shape %0 -> !shape.shape ``` }]; let arguments = (ins TFR_TensorType:$arg);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Apr 22 10:54:29 UTC 2024 - 17.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/utils.h
} int rank = shaped_type.getRank(); if (rank < 2) { return nullptr; } SmallVector<int64_t> new_shape(shaped_type.getShape().begin(), shaped_type.getShape().end()); std::swap(new_shape[rank - 1], new_shape[rank - 2]); return shaped_type.clone(new_shape); } // Returns a ShapedType for a permutation and the shape of input after
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Apr 30 00:40:15 UTC 2024 - 11.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/convert_tf_xla_op_to_tf_op.cc
mlir::cast<ShapedType>(slice_sizes.getType()).getShape(), builder.getI64Type()), slice_sizes)); // Collapses dimensions by reshaping. SmallVector<int64_t> new_shape(operand_rank - collapsed_dims.size()); for (int64_t i = 0, j = 0; i < operand_rank; i++) { if (!collapsed_dims.contains(i)) { new_shape[j++] = operand_shape[i]; } }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 13.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/experimental/tac/transforms/device_transform_patterns.cc
// Get the new shape. SmallVector<int64_t, 4> new_shape; for (int i = 0; i < 4 - rank; ++i) { new_shape.push_back(1); } for (auto size : input_type.getShape()) { new_shape.push_back(size); } auto reshape_op = InsertReshapeOp(concat_op.getLoc(), input, input_type.getElementType(), new_shape, &rewriter); reshape_ops.push_back(reshape_op.getResult());
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/transforms/legalize_tf.cc
mlir::cast<ShapedType>(lhs.getType()).getShape(), mlir::cast<ShapedType>(rhs.getType()).getShape(), symbolic_broadcast_shape)) { return failure(); } // Calculates the broadcast shape using BroadcastArgs op. Value lhs_shape = GetShape(lhs, op->getLoc(), rewriter); Value rhs_shape = GetShape(rhs, op->getLoc(), rewriter); auto broadcast_shape =
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon May 20 20:06:54 UTC 2024 - 45.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tpu_space_to_depth_pass.cc
TF::ReshapeOp GetReshapeOpForConv2DFilter(ArrayRef<int64_t> new_shape, Value input, OpBuilder* builder) { auto reshape_result_type = RankedTensorType::get(new_shape, getElementTypeOrSelf(input)); auto reshape_type = RankedTensorType::get( {static_cast<int64_t>(new_shape.size())}, builder->getIntegerType(64));
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/transforms/einsum.cc
const int64_t b = lhs_type.getShape()[std::get<0>(i)]; lhs_shape.push_back(b); out_shape->push_back(b); lhs_reshape_segids.at(std::get<0>(i)) = num_lhs_reshape_segids++; } } else { const int64_t lhs_out_size = ProdShapeWithIndexInTuple<0>(lhs_type.getShape(), dnums.lhs_out); lhs_shape.push_back(lhs_out_size); out_shape->push_back(lhs_out_size);
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/transforms/push_transpose_through_ewise.cc
llvm::ArrayRef<int32_t> perm) { llvm::SmallVector<int64_t> new_shape(shape.size()); for (const auto &perm_element : enumerate(perm)) { new_shape[perm_element.index()] = shape[perm_element.value()]; } return new_shape; } // Determine if op commutes with transposes. Requires a strict // definition of Elementwise, all i/o shapes and types must be same-rank
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 12.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/preprocess_op.cc
auto new_shape_const_attr = DenseElementsAttr::get(shape_spec_type, new_shape.getShape()); rewriter.setInsertionPointAfter(weight_op); auto new_shape_const = rewriter.create<arith::ConstantOp>( weight_op->getLoc(), shape_spec_type, new_shape_const_attr); auto reshape_op = rewriter.create<TF::ReshapeOp>( weight_op->getLoc(), new_shape, weight_op->getResult(0), new_shape_const);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.cc
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 08 02:10:16 UTC 2024 - 43.2K bytes - Viewed (0)