Skip to content

Commit

Permalink
[AMD] fixed getLeafForOps implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
ravil-mobile committed Nov 25, 2024
1 parent 576bee1 commit f62acd8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions third_party/amd/lib/TritonAMDGPUToLLVM/Utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,9 +366,9 @@ SmallVector<scf::ForOp> getLeafForOps(triton::FuncOp funcOp) {

SmallVector<scf::ForOp> leafOps;
for (scf::ForOp forOp : allOps) {
auto searchResult =
forOp->walk([](scf::ForOp) { return WalkResult::interrupt(); });
if (searchResult.wasInterrupted())
auto searchResult = forOp.getBody()->walk(
[](scf::ForOp) { return WalkResult::interrupt(); });
if (!searchResult.wasInterrupted())
leafOps.push_back(forOp);
}
return leafOps;
Expand Down

0 comments on commit f62acd8

Please sign in to comment.