Skip to content

Commit

Permalink
[COMMON] Select the last compute op that has workgroup tilin… (iree-o…
Browse files Browse the repository at this point in the history
…rg#18604)

…g level

Remove the check "expected only one op with a workgroup tiling level".
  • Loading branch information
pashu123 authored Sep 26, 2024
1 parent 5a2dd56 commit d18064f
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,17 @@ struct TilingInfo {
static FailureOr<TilingInfo>
getTiledAndDistributionInfo(RewriterBase &rewriter,
ArrayRef<Operation *> computeOps) {
// It is expected that at most one compute op has a workgroup tiling level.
// TODO: It is expected that at most one compute op has a workgroup tiling
// level. Currently, it selects the last compute op that has workgroup tiling
// level.
Operation *tilableOp = nullptr;
for (Operation *op : llvm::reverse(computeOps)) {
if (getLoweringConfig(op)) {
if (!getLoweringConfig(op).hasWorkgroupTilingLevel()) {
continue;
}
if (tilableOp) {
return op->emitOpError("expected only one op with a workgroup tiling"
"level.");
}
tilableOp = op;
break;
}
}
if (!tilableOp) {
Expand Down

0 comments on commit d18064f

Please sign in to comment.