Commit 3e02da7
fix(weight-pager): guard cross-layer prefetch behind GGML_USE_HIP
The WP_PREFETCH_XLAYER cross-layer router-prefetch block (off by default) was
added without a backend guard, but it uses HIP-only symbols — current_hip_device
/ ggml_cuda_get_wp_compute_stream (declared only under GGML_USE_HIP) and raw
hip* device copies. It compiled on the HIP build (R9700/6900xt) but broke
build-army's CUDA sm_61 compile with "hipStream_t was not declared" etc.,
which blocked mad-lab-2026 (1070 CUDA + 480 Vulkan) from building master.
Weight paging is an RDNA/HIP feature and the non-HIP cards don't page weights,
so wrap the block in #if defined(GGML_USE_HIP). HIP builds are byte-identical
(block unchanged inside the guard); CUDA/Vulkan builds compile it out. Verified
build-hip still links clean.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GxHFe5y6ACxqFmFFzDBwtg1 parent 9a65e05 commit 3e02da7
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
338 | 344 | | |
339 | 345 | | |
340 | 346 | | |
| |||
421 | 427 | | |
422 | 428 | | |
423 | 429 | | |
| 430 | + | |
424 | 431 | | |
425 | 432 | | |
426 | 433 | | |
| |||
0 commit comments