Repository navigation
Commit ea0950a
authored
[TIRX] Split backend.cuda.intrinsics, fold tcgen05 descriptors, and fix two PTX dialect gaps (#20120)
Rebased onto current `main`. Five commits, all confined to the TIRx CUDA
backend and its tests.
### `[REFACTOR][TIRX]` split `backend.cuda.intrinsics` into `codegen/`
and `cpp/`
`backend/cuda/intrinsics/` mixed two unrelated concerns: the machinery
that generates intrinsic bindings, and the C++/PTX surface those
bindings expose. They now live apart — `codegen/` holds the registry,
schema, header, and type plumbing; `cpp/` holds the descriptors, ASM
builtins, instrumentation, and NVSHMEM surface. `cp_async`, `math`,
`memory`, `sync`, and `wgmma` are folded into their new homes.
### `[FEAT][TIRX]` fold the block-scaled tcgen05 descriptors at compile
time
The block-scaled tcgen05 instruction descriptors were assembled at
runtime from values that are all known while lowering. They are now
folded during compilation, which removes the per-call packing work from
the generated kernel.
### `[FIX][TIRX]` support widened signed PTX loads
The PTX dialect table rejected loads whose destination register is wider
than the signed source operand, which is legal and is what a
sign-extending load emits.
### `[FIX][TIRX]` support no-hint mbarrier parity waits
`mbarrier.try_wait.parity` without a hint operand failed to match a
table entry, so a parity wait written without an explicit hint would not
lower.
### `[CHORE]` tir-test skill GPU selection
The `tir-test` skill refused to run when any candidate GPU showed
non-zero utilization or resident memory, and aborted outright if another
process appeared on a selected card at baseline. On a shared machine
that blocked the suite for reasons unrelated to the code under test.
Selection now takes every Blackwell device.
### Testing
TIRx suite: 3024 passed, 73 skipped, 0 failed.1 parent 5137563 commit ea0950a
29 files changed
Lines changed: 1506 additions & 1578 deletions
File tree
- .agents/skills/tir-test
- docs/tirx/api
- python/tvm
- backend/cuda
- codegen
- cpp
- intrinsics
- ptx
- tile_primitive/gemm_async
- script
- tirx/operator/intrinsics
- tests/python/tirx/codegen
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | 14 | | |
17 | 15 | | |
18 | 16 | | |
19 | 17 | | |
20 | 18 | | |
21 | 19 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | 20 | | |
31 | 21 | | |
32 | 22 | | |
| |||
37 | 27 | | |
38 | 28 | | |
39 | 29 | | |
40 | | - | |
| 30 | + | |
41 | 31 | | |
42 | | - | |
43 | | - | |
44 | | - | |
| 32 | + | |
45 | 33 | | |
46 | | - | |
| 34 | + | |
47 | 35 | | |
48 | 36 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
| 37 | + | |
| 38 | + | |
53 | 39 | | |
54 | 40 | | |
55 | 41 | | |
| |||
64 | 50 | | |
65 | 51 | | |
66 | 52 | | |
67 | | - | |
| 53 | + | |
68 | 54 | | |
69 | 55 | | |
70 | 56 | | |
| |||
80 | 66 | | |
81 | 67 | | |
82 | 68 | | |
83 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
84 | 72 | | |
85 | 73 | | |
86 | 74 | | |
| |||
111 | 99 | | |
112 | 100 | | |
113 | 101 | | |
114 | | - | |
| 102 | + | |
115 | 103 | | |
116 | 104 | | |
117 | 105 | | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
| 106 | + | |
159 | 107 | | |
160 | 108 | | |
161 | 109 | | |
162 | 110 | | |
163 | 111 | | |
164 | 112 | | |
165 | 113 | | |
166 | | - | |
| 114 | + | |
167 | 115 | | |
168 | 116 | | |
169 | 117 | | |
170 | 118 | | |
171 | | - | |
| 119 | + | |
172 | 120 | | |
173 | 121 | | |
174 | 122 | | |
| |||
180 | 128 | | |
181 | 129 | | |
182 | 130 | | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
| 131 | + | |
| 132 | + | |
206 | 133 | | |
207 | 134 | | |
208 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
56 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
57 | 65 | | |
58 | 66 | | |
59 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | | - | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
73 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
74 | 78 | | |
75 | 79 | | |
76 | 80 | | |
| |||
106 | 110 | | |
107 | 111 | | |
108 | 112 | | |
| 113 | + | |
| 114 | + | |
109 | 115 | | |
110 | | - | |
111 | 116 | | |
112 | 117 | | |
113 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
28 | 23 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
34 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
| 37 | + | |
39 | 38 | | |
40 | 39 | | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
File renamed without changes.
File renamed without changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | 46 | | |
48 | 47 | | |
| 48 | + | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
File renamed without changes.
File renamed without changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
0 commit comments