Commit 5b08503
plumb per-build wave-size flags from CMake into codegen (#6103)
Summary:
X-link: https://github.com/facebookresearch/FBGEMM/pull/3008
Add the CMake-to-codegen plumbing that a later change uses to emit only the wave-size-specific kernel instantiations and host dispatch tables a given ROCm wheel needs. `cmake/Hip.cmake` derives `FBGEMM_HAS_WAVE32` / `FBGEMM_HAS_WAVE64` from `PYTORCH_ROCM_ARCH` (gfx9* is wave64; gfx10/11/12 is wave32), `CMakeLists.txt` forwards them to the gen scripts as `--has_wave32` / `--has_wave64`, and `scripts_argsparse.py` parses them.
This change is pure plumbing: the flags are parsed but not yet consumed by the Jinja templates, so generated code is byte-identical to before on every build configuration. The consumer lands in the next PR in the chain. Splitting the plumbing out lets it be reviewed and landed without touching any generated kernel output.
Fourth in the chain splitting #5804 into reviewable pieces; stacked on #6037.
Authored with assistance from Claude (Anthropic).
Pull Request resolved: #6103
Reviewed By: cthi
Differential Revision: D114618233
Pulled By: q10
fbshipit-source-id: 306b374d49e7dcfd0b3b3513520001d2d5afe1dc1 parent 204fc30 commit 5b08503
3 files changed
Lines changed: 29 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| 185 | + | |
185 | 186 | | |
186 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
187 | 194 | | |
188 | 195 | | |
189 | 196 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
37 | 53 | | |
38 | 54 | | |
39 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
| |||
0 commit comments