Skip to content

Commit 695c4f2

Browse files
authored
[NFC][mlir][tensor] Use ValueRange instead of SmallVector in tensor::createPadHighOp (#144397)
Use `ValueRange` instead of `SmallVector` in `tensor::createPadHighOp` for the `dynOutDims` arg.
1 parent febb7e8 commit 695c4f2

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

mlir/include/mlir/Dialect/Tensor/Utils/Utils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ namespace tensor {
3030
// for _static_ dimensions.
3131
PadOp createPadHighOp(RankedTensorType resType, Value source, Value pad,
3232
bool nofold, Location loc, OpBuilder &builder,
33-
SmallVector<Value> dynOutDims = {});
33+
ValueRange dynOutDims = std::nullopt);
3434

3535
// Creates dim ops for each dynamic dimension of the ranked tensor argument and
3636
// returns these as values.

mlir/lib/Dialect/Tensor/Utils/Utils.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ using namespace mlir::tensor;
2424

2525
PadOp mlir::tensor::createPadHighOp(RankedTensorType resType, Value source,
2626
Value pad, bool nofold, Location loc,
27-
OpBuilder &b,
28-
SmallVector<Value> dynOutDims) {
27+
OpBuilder &b, ValueRange dynOutDims) {
2928

3029
// This assumption simplifies the following logic without limiting what's
3130
// required _today_. If needed, we can relax it in the future.

0 commit comments

Comments
 (0)