Skip to content

Commit 0a9556d

Browse files
committed
improve
1 parent f1e9f69 commit 0a9556d

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2535,8 +2535,11 @@ transform::TileOp::apply(transform::TransformRewriter &rewriter,
25352535
return diag;
25362536
}
25372537
if (tileSizes.size() > tilingInterface.getLoopIteratorTypes().size()) {
2538-
DiagnosedSilenceableFailure diag = emitSilenceableError()
2539-
<< "too many tiles for";
2538+
DiagnosedSilenceableFailure diag =
2539+
emitSilenceableError()
2540+
<< "too many tiles provided, expected at most "
2541+
<< tilingInterface.getLoopIteratorTypes().size() << " found "
2542+
<< tileSizes.size();
25402543
diag.attachNote(op->getLoc()) << "target op";
25412544
return diag;
25422545
}

mlir/test/Dialect/Linalg/transform-op-tile.mlir

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ transform.sequence failures(propagate) {
223223

224224
// -----
225225

226-
func.func @matmul(%arg0: tensor<128x128xf32>, %arg1: tensor<128x128xf32>,
227-
%arg2: tensor<128x128xf32>) -> tensor<128x128xf32> {
226+
func.func @too_many_tiles(%arg0: tensor<128x128xf32>, %arg1: tensor<128x128xf32>,
227+
%arg2: tensor<128x128xf32>) -> tensor<128x128xf32> {
228228
// expected-note @below {{target op}}
229229
%0 = linalg.matmul ins(%arg0, %arg1: tensor<128x128xf32>, tensor<128x128xf32>)
230230
outs(%arg2: tensor<128x128xf32>) -> tensor<128x128xf32>
@@ -234,6 +234,6 @@ func.func @matmul(%arg0: tensor<128x128xf32>, %arg1: tensor<128x128xf32>,
234234
transform.sequence failures(propagate) {
235235
^bb0(%arg1: !transform.any_op):
236236
%0 = transform.structured.match ops{["linalg.matmul"]} in %arg1 : (!transform.any_op) -> !transform.any_op
237-
// expected-error @below {{too many tiles for}}
237+
// expected-error @below {{too many tiles provided, expected at most 3 found 4}}
238238
%1, %loops = transform.structured.tile %0 [1, 0, 0, 0] : (!transform.any_op) -> (!transform.any_op, !transform.any_op)
239239
}

0 commit comments

Comments
 (0)