Commit 4ea942b
authored
[SWP] Attempt to move all scheduling logic to a scheduling pass (#4618)
The main purpose is to move all scheduling related logic including
scheduleDeps/scheduleDistOne/scheduleRemaining to a new loopScheduling
pass. The new pass will generate (stage, cluster) attributes for each
operation inside a loop.
For operations that are created during createAsyncOps, we manually add
the (stage, cluster) based on the attributes prior to lowering. In most
cases, the lowered operations should have (stage, cluster) of the
original loadOp, or should have (stage, cluster) of the first use of the
loadOp.
This patch also gets rid of prefetchCluster, instead it prefetches one
stage before the actual use
setStageCluster(forOp, wait, stageForFirstUse - 1, clusterForFirstUse +
1);
setStageCluster(forOp, viewLoad, stageForFirstUse - 1,
clusterForFirstUse + 1);
comparing to
schedule.insert(wait, numStages - 2, prefetchCluster);
schedule.insert(viewLoad, numStages - 2, prefetchCluster);
At end of createAsyncOps, we make sure all operations inside the loop
have (stage, cluster) attributes.
There is no need to maintain CoarseSchedule in SWP, instead we will just
use (stage, cluster) attributes.1 parent d06ec83 commit 4ea942b
File tree
19 files changed
+922
-594
lines changed- include/triton/Dialect/TritonGPU/Transforms
- lib/Dialect/TritonGPU/Transforms
- Pipeliner
- python
- src
- test/unit
- test/TritonGPU
- third_party/nvidia/backend
19 files changed
+922
-594
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
182 | 195 | | |
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
32 | 39 | | |
33 | 40 | | |
34 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
104 | 107 | | |
105 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
106 | 114 | | |
107 | 115 | | |
108 | 116 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
195 | 199 | | |
196 | 200 | | |
197 | 201 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
0 commit comments