Repository navigation
Shaders: take the wave-wide form as a last resort on 32-lane hosts - #40
notquiteog wants to merge 1 commit into
Conversation
A console wave64 compute program that no other form takes off 64-lane waves keeps WaveSize(64), so a host whose waves are 32 lanes (NVIDIA) refuses its pipeline and every dispatch of it is dropped. The wave-wide form (`widen`) is exact, but it is off unless VICTORY_WAVE_WIDE=1, because it lost a card on two particle programs. Those programs have another form and return before this point. It is now also tried last of all, after every other form has left the program on 64-lane waves, where the only other outcome is the pass not running. VICTORY_WAVE_WIDE=0 leaves such programs refused, as before; =1 is unchanged. On an RTX 5060 Ti (32-lane waves) this makes host pipelines for sr_tracing:CS_Tiling_Generate_Opaque (2cc4c197ee29e291) and GpuParticleUpdate:CS_Visibility (369cbe906ea72764); both pass the DXIL validator. Programs whose thread group is several console waves are not helped: `widen` refuses those. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
I had the same 23 lines prepared on Census (
Tests. Two tests for In game (RTX 4080, default switches, 10 minutes from a prologue save, on With I can push the two tests here or as a follow-up PR if you want them. One detail in the code: the new block computes the AI-assisted (Claude Code); measured on my machine. No game data: counts, hashes and log lines only. |
|
One more data point from the RTX 4080, on where the wave-wide form loses the device. It does not change what #40 does; it narrows #14's report. What we ran. A local experiment (not something we propose): a build with #40's change plus a switch that sends every wave64 program reaching that retry point to the wave-wide form, before the other forms, instead of only the programs nothing else takes. The prologue save, default switches otherwise, with What happened. The device was lost at 140 s, about 100 frames after the world appeared ( About the program. On a 32-lane host it has no exact form: What this shows about #40. #40 never sends this program to the wave-wide form. It has an approximate form earlier in the chain, so it returns before #40's last-resort call. We checked: at What it does not show. Why the wave-wide form hangs on this program. Whether other programs #40 now sends there can hang the same way is also open. Of the ones used in the scene we can reach, all four ran 10 minutes without a device loss. AI-assisted (Claude Code); measured on my machine. No game data: hashes and log lines only. |
Independent validation — RTX 3060 Laptop GPU (Ampere)Reproduced your two successful pipeline recoveries on another NVIDIA architecture. Test configuration
Additional opt-in D3D12 InfoQueue instrumentation (PSOTRACE1) was used to distinguish pipeline-library cache misses from actual PSO creation failures. Results Shader | Earlier instrumented baseline | With #40 -- | -- | -- 369cbe906ea72764 | Refused, ID 622 | Created 2cc4c197ee29e291 | Refused, ID 622 | Created 02384a60fda6f2d0 | Refused, ID 622 | Refused, ID 622 2da4beb386509b77 | Refused, ID 622 | Refused, ID 622Sanitized trace excerpts (timestamps, ANSI formatting, and unrelated fields omitted; grouped by shader):
Both remaining creation failures produced D3D12 validation message ID 622: The translator also reported the expected multi-wave restriction:
All four targeted pipelines experienced cache misses before their respective creation attempts. Neither successful result came from a cached pipeline. The runtime exited normally with code 0 after approximately 186 seconds. This independently confirms the reported two-pipeline recovery on Ampere hardware. This was a startup compatibility test; shader output equivalence, in-world stability, visual improvements, and performance gains have not yet been established. I'm also investigating multi-wave lowering and synthetic cross-wave correctness tests for the remaining cases, while retaining the existing conservative guard. Thanks for the patch! AI-assisted diagnostic tooling and analysis; native testing performed on my hardware. |
Port of DexNom#40 (notquiteog), unchanged. A console wave64 compute program that no other form takes off 64-lane waves is refused by a 32-lane host and every dispatch of it is dropped; the exact wave-wide form is tried last, only for those. VICTORY_WAVE_WIDE=0 keeps the old refusal. On the RTX 5060 this creates 22 of the 31 compute pipelines the title's preload left refused for requiring WaveSize(64). The 9 left: 7 run groups of several console waves (128 to 1024 threads), which the wave-wide form does not take, and 2 are ray-tracing BVH builder programs (28918b7150a7aad5, caa78b8ca62bc3d6) whose waves exchange across halves. Co-Authored-By: notquiteog <notquiteog@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What
On a host with 32-lane waves (NVIDIA), a console wave64 compute program that no existing form takes off 64-lane waves keeps
WaveSize(64). The host refuses its pipeline and every dispatch of it is dropped.This tries the exact wave-wide form (
widen) as a last resort for those programs only, after every other form has failed. One file, 23 lines, incrates/victory-shader/src/emit/mod.rs.Why it should be safe where the form is off today
The wave-wide form is off unless
VICTORY_WAVE_WIDE=1because it lost a card onptfx_CS_lightAtlas_Spriteand_Trail. Those two have another working form, so they return before the new code is reached. The new attempt only runs where the alternative is the pass not running at all.VICTORY_WAVE_WIDE=0: such programs stay refused, as before.VICTORY_WAVE_WIDE=1: unchanged.Tested
RTX 5060 Ti 16 GB (wave lanes min 32, max 32), i5-13600K, Windows 11, on
2e01ab4plus this commit, withVICTORY_HOST_MAX_WAVE=32 victory translate --list --validate --pipelines:VICTORY_WAVE_WIDE=0sr_tracing:CS_Tiling_Generate_Opaque2cc4c197ee29e291GpuParticleUpdate:CS_Visibility369cbe906ea72764In game, on a branch that also carries #7, #16, #17, #18, #22 and #24: 7.5 minutes in the story world with this on, no device loss.
Not tested, and what it does not fix
widenrefuses them. On this card that leavesvfx_triangleClip:CS_DefragHeap_ComputeRelocations02384a60fda6f2d0(groups of 128) andalphaResolve:CS_AlphTransmissionPrefilterMip2da4beb386509b77(groups of 256) refused.🤖 Generated with Claude Code