Commit 6440310
committed
[Relax] Apply DefaultGPUSchedule() in default build pipeline
This is a follow-up to #15864, which
added `LegalizeOps` to the default Relax build pipeline. Since
legalization may produce additional TIR PrimFuncs that require
scheduling, the output of `LegalizeOps` typically must also be passed
through `tir.transform.DefaultGPUSchedule()`. This PR adds
`DefaultGPUSchedule()` to the relax build pipeline to handle these
cases.
Scheduled PrimFunc have the `"tir.is_scheduled"` attribute set to
true, and are ignored by `DefaultGPUSchedule()`. In addition, the
`DefaultGPUSchedule` transform has no effect on non-GPU targets.
Therefore, this change should only impact `tvm.relax.build` calls that
previously resulted in an error due to unscheduled GPU functions, and
should not have any impact on existing calls.1 parent 72b75fe commit 6440310
File tree
3 files changed
+27
-3
lines changed- python/tvm/relax
- tests/python
- ir
- relax
3 files changed
+27
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| 88 | + | |
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
| 17 | + | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
59 | | - | |
| 60 | + | |
| 61 | + | |
60 | 62 | | |
61 | 63 | | |
62 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1309 | 1309 | | |
1310 | 1310 | | |
1311 | 1311 | | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
1312 | 1332 | | |
1313 | 1333 | | |
0 commit comments