Skip to content

Commit 27c8363

Browse files
[BW][PIPELINE] Skip waits when scheduling downward dependencies in mmav5 pipelining (#5903)
Previous approach for scheduling pre-existing `wait_barrier`s in mmav5 pipelining relies on checking which async ops are they waiting for, and scheduling them to the same stage. This however won't work, if we'll schedule wait to some random stage based on the stage it's operands are scheduled to.
1 parent d664a09 commit 27c8363

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/Dialect/TritonGPU/Transforms/Pipeliner/TC05MMAPipeline.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,9 @@ bool insertUsersOfOp(tt::CoarseSchedule &coarseSchedule, Operation *op,
816816
int stage, tt::CoarseSchedule::Cluster cluster) {
817817
bool changed = false;
818818
for (auto user : op->getUsers()) {
819-
if (coarseSchedule.count(user) == 0) {
819+
// Let wait barriers be scheduled based on the stage of async op it waits
820+
// for.
821+
if (!isa<ttng::WaitBarrierOp>(user) && coarseSchedule.count(user) == 0) {
820822
changed = true;
821823
coarseSchedule.insert(user, stage, cluster);
822824
insertUsersOfOp(coarseSchedule, user, stage, cluster);

0 commit comments

Comments
 (0)