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>
…f fxceless#854) Port of 26600c6 from fxceless/victory-fork#854 by PiloteCode ("wave64 programs in a paired form on 32-lane hosts, mesh programs over 32 KiB linked with their pixel program, and more"). Each console wave runs as one host wave of 32 lanes, each thread two console lanes (n and n + 32), with every per-lane branch taken by the whole wave and EXEC as each lane's guard. It is tried after every other form for a wave64 compute program the host refuses (VICTORY_WAVE_PAIRS=0 turns it off). On the 31 wave64 compute containers from the RTX 5060 preload, 29 get a pipeline (22 before): 02384a60fda6f2d0, 1d434307d981352a, 22338086ea4c5364, 2da4beb386509b77, 3b02415f67c6b0d8, 6832a9da15c2e584 and 6b82bc7d22016cb5 now take the paired form; the other 22 are unchanged. Adapted to this branch: - Kept from this branch: scalar_built() and the v_readfirstlane own-lane read, lds_subtract() with Module::negated() (the PR's own LDS subtraction loop is left out), the wave-wide last resort from DexNom#40 (now inside emit_forms), the POPS translation from pops.rs, the structured view record count / picked address / puddle texture size paths and scalar UINT views (moved into descriptor_data.rs next to the PR's unused-descriptor path, which now only runs where this branch refused). - Left out: the PR's second POPS implementation (ir::without_pops_wait, Shader::ordered and its test), which would have run beside pops.rs. - The ray-tracing structure builder's programs (a spilled user-data table, as victory-gpu classifies them) are refused by the paired form: forcing them onto 32-lane hosts hung NVIDIA GPUs in Marvisak#2711. 28918b7150a7aad5 and caa78b8ca62bc3d6 stay refused. - The new modules are classified in lib.rs; a test that expected the parked mask to be opaque when built alone checks only the shared build; the descriptor size test fills the record-count root word the runtime fills. Co-Authored-By: Pilote Production <75377040+PiloteCode@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…wave-wide form last on 32-lane hosts (port of DexNom/VIctory#40) On a 32-lane host (NVIDIA), a console wave64 compute program that every form leaves at WaveSize(64) is refused by the driver and its dispatches are dropped every frame: GpuParticleUpdate:CS_Visibility (369cbe906ea72764) in the prologue. The wave-wide form is exact and gives it a pipeline; it is now tried last of all, where the only other outcome is the pass not running. Programs that have another form never reach it, so nothing that translates today changes. VICTORY_WAVE_WIDE=0 leaves them refused; VICTORY_WAVE_DEEP_SKIPS=0 keeps the deep form out of its bases. TRANSLATOR_VERSION 4 -> 5 (the refused programs' cached translations change). 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