Repository navigation
GPU+shader: translate wave64 programs for 32-lane host waves when WaveLaneCountMax < 64 - #2176
n-romanovich wants to merge 1 commit into
Conversation
…eLaneCountMax < 64
|
Correction. My original The original PSO result stands. RTX 5080, driver 617.14, Windows 11 Pro build 26200.9974, PR head I also independently reproduced @Dathinel's actual Corrected test report · Synthetic fixtures OpenAI Codex (GPT-6) ran the RTX 5080 tests and drafted this correction. |
|
The cross-half issue also affects scalar
All three pipelines dispatched successfully. This tests scalar Fixture words (hex), raw UAV at heap index 0: Control with lane 5: changing only the source lane from 32 to 5 produced 5 for threads 0–31 and 37 for threads 32–63 on this PR. On #189 and #439 all 64 threads returned 5. A guard that only rejects indices above 31 would miss this case. AI-assisted; synthetic inputs only. |
DenRakEiw
left a comment
There was a problem hiding this comment.
Verified locally merged onto origin/main (940d32f, Windows 11 x64, NVIDIA GeForce RTX 5090, Rust 1.98.1 MSVC):
cargo test -p victory-gpu --lib shader_cache::— 3 passed, 0 failedcargo test -p victory-shader --lib emit::lower::tests::— 21 passed, 0 failedcargo clippy -p victory-gpu -p victory-shader --all-targets— 0 warningscargo xtask policy— ok (183 files ok)
Clean host-wave32 translation path and cache-key inclusion for wave64 programs on hosts with WaveLaneCountMax < 64. Looks good.
AI-assisted (Gemini 4 Neon).
|
Overlap note: #189 (alfycs) and #233 / #320 / #439 (r4tedx) also run wave64 programs on 32-lane hosts, and they emulate the operations that cross the halves. This PR runs each half as its own 32-lane wave, and
Programs without cross-half operations run correctly this way, which matches iGoldenNinja's 3/3 PSOs. For the rest, #233 refuses by name what it can't emulate yet. Taking this as a fallback only for programs with no cross-half operation, or building on #233's split, would avoid silently wrong lanes. AI-assisted (Claude Code); source read only. |
catminou4
left a comment
There was a problem hiding this comment.
Tested locally: macOS arm64, rustc 1.98.1, PR head merged into main 940d32f, cargo test -p victory-shader --locked (shader half; the GPU half is Windows-only).
144 passed / 0 failed / 2 ignored. Wave64 programs translated for 32-lane host waves — wave64→wave32 translation; relates to #189/#233/#1960's wave64 cluster. Shader side green; GPU execution path needs Windows hardware validation.
Offline measurement on a retail dumpResult: no count change against I merged head 3feadc6 onto No program changes its failure reason. The count shows that the change rejects nothing on this data. It does not show whether the output is right. No shader names or data are included, per the asset policy. AI-assisted (Claude Code). |
RTX 4060 Laptop: the PR takes compute PSO refusals from 115 to 0, and the world still fails on the descriptor heapIndependent check on a card not yet reported: RTX 4060 Laptop (Ada), driver The detection works here: The PR does what it says for pipeline creationCounted from a
So on this machine every one of the 115 wave64 compute pipelines that What it does not change: the world still dies on the capped descriptor heapSame two runs, the counters that matter for reaching the world:
So on this card the two failures are independent, and fixing the wave side does not get the world up. That may be worth stating plainly in the PR body: this PR removes the Agreement with @sinan-cmyk's offline resultTheir Not tested / not claimed
Logs and the failing-test detail available if useful. |
Summary
NVIDIA and Intel GPUs only execute 32-lane compute waves (
WaveLaneCountMax < 64) and reject pipelines declaringWaveSize(64).This adds Wave32 host translation mode so wave64 console programs run as two 32-lane host waves instead of failing pipeline creation:
D3D12_FEATURE_DATA_D3D12_OPTIONS1invictory-gpu(host_wave32(), overridable viaVICTORY_HOST_WAVE32).set_host_wave32/host_wave32invictory_shader::emitand emitWaveSize(32)when enabled, masking wave lane indices inread_lane,ds_bpermute, andcross_laneviahost_wave()/host_lane().victory-gpu::shader_cache::keyso Wave32 and Wave64 shader caches stay isolated.Verification
Tested on NVIDIA GeForce RTX 5060 Ti:
cargo test --release -p victory-shader --lib -- diff_tests valu_tests:33 passed; 0 failedcargo test --release -p victory-gpu --lib -- shader_cache:3 passed; 0 failed