Repository navigation
Commit f15a41a
authored
Fix CI breaks from the off-graph KV stack (ROCm build, muse-glimmer offgraph e2e) (pytorch#23304)
Fixes CI breaks introduced by the off-graph KV stack (pytorch#23292–pytorch#23297).
### 1. ROCm build (`unittest-rocm-gfx950-rocm7.2`,
`test-voxtral-realtime-rocm-gfx950-rocm7.2`)
pytorch#23293 added `backends/cuda/runtime/cuda_kv_cache.h`, which includes
`<cuda_runtime.h>` directly. The ROCm build compiles `aoti_cuda_backend`
with `EXECUTORCH_USE_HIP` and no CUDA toolkit:
```
backends/cuda/runtime/cuda_kv_cache.h:14:10: fatal error: cuda_runtime.h: No such file or directory
```
- Include `executorch/extension/cuda/runtime_api.h` (the CUDA/HIP shim
used by the rest of the runtime) instead.
- Add HIP shims for the event APIs the KV cache uses: `cudaEvent_t`,
`cudaEventCreateWithFlags`, `cudaEventDisableTiming`,
`cudaEventDestroy`, `cudaEventRecord`, `cudaStreamWaitEvent`.
### 2. `test-muse-glimmer-cuda-e2e-kquant-17gb-solo-text-offgraph`
pytorch#23296 added this job and the `solo-text-offgraph` export branch, but
the early mode validation in `.ci/scripts/export_model_artifact.sh`
still only allowed `solo-text`/`dflash-image`:
```
Error: Muse Glimmer requires mode 'solo-text' or 'dflash-image'
```
Allow `solo-text-offgraph` there.
### 3. Off-graph export fails in AOTI lowering
Once past the mode check, the same job fails in export:
```
InductorError: RuntimeError: When autotune_at_compile_time is False, AOTInductor generates both JIT code and AOT code. The JIT code failed to run.
```
pytorch#23295 forced `autotune_at_compile_time=OFF` for the off-graph export.
With it off, AOTI tunes by running a JIT build of the wrapper on the
real constants. `LowerOffGraphKVPass` declares the KV storage constants
with zero-byte storage, because the runtime supplies the storage, so
nothing can run on them. The CUDA unit test only works because it swaps
them for real zero tensors first. This drops the override so AOTI keeps
its default compile-time autotune on generated inputs, which is the mode
the pass's `kv_len` derivation is written for.
Test plan: ROCm + CUDA CI on this PR.1 parent 8a03574 commit f15a41a
5 files changed
Lines changed: 28 additions & 5 deletions
File tree
- .ci/scripts
- backends/cuda
- passes
- runtime
- examples/models/muse-glimmer/export
- extension/cuda
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
292 | | - | |
293 | | - | |
| 292 | + | |
| 293 | + | |
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
| 311 | + | |
| 312 | + | |
311 | 313 | | |
312 | 314 | | |
313 | 315 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | 16 | | |
19 | 17 | | |
| 18 | + | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
319 | | - | |
320 | 319 | | |
321 | 320 | | |
322 | 321 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
53 | 69 | | |
54 | 70 | | |
55 | 71 | | |
| |||
167 | 183 | | |
168 | 184 | | |
169 | 185 | | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
170 | 193 | | |
171 | 194 | | |
172 | 195 | | |
| |||
0 commit comments