Repository navigation
Conversation
|
Test report from a second Blackwell card. Tested
With #269 (scalars in divergent loops), local only
Not tested
Re-run on the new head AI use
|
The loop form compilers emit keeps the lanes that are done in an exit mask that starts as 0 (s_mov_b64 s[2:3], 0; in the loop s_or_b64 s[2:3], vcc, s[2:3] and s_andn2_b64 exec, exec, s[2:3]). In the console flow every mask join is a phi, and its incoming values had to be masks derived from EXEC or a VALU result, so such a loop stopped with "a lane-mask join of an untracked mask". `Structured::others` gives the lane's bit of the other values read as masks (constants, uniform selects, opaque ones), and the console flow's mask joins take them. The per-lane form is unchanged. New test: a loop in that form with a lane read in every iteration and the exit mask counted afterwards. It was refused on an RTX 5070 before and is exact there (in two halves) and on a Radeon iGPU now. Found through the test report on Marvisak#233 that tried Marvisak#269's programs. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Thanks for the run on a second Blackwell card, and for trying the two together. I reproduced all of it on an RTX 5070 and a Radeon iGPU (RDNA2, 32..64) and followed it up. The build break. Yes: whichever of #269 and this lands second needs The per-half counts are not from this PR's split. #269's programs read no other lane, so they declare no wave size, and a 64-thread group runs as whatever waves the host forms: two of 32 on NVIDIA, with or without this PR. #269 takes its maxima over the host wave, which is the console wave only when the host forms 64-lane waves. The Radeon iGPU here shows the same thing on plain #269 The console flow gets #269's four programs right, after one fix. With a local switch that sends every compute program through the console flow (not in any PR), in a merge of #269 onto #320:
Scalars are the wave's own there by construction (every lane runs every block, branches are taken wave-wide), so nothing needs a maximum. The fix: What is not done. Neither this PR nor #320 selects the console flow for #269's programs: they select on lane reads and on masks read whole, not on scalars leaving a divergent loop. So the combination still gives per-half counts for the two scalar tests on a 32-lane host until one of them makes that selection. I would rather add it as a follow-up once #269 or this has landed than guess at #269's condition here. No game data used. AI-assisted. |
|
Tested the PR head at I also launched the local integration build. It reached the intro location card, then presented a black frame with 1,872 draws and exited with DXGI_ERROR_DEVICE_HUNG. The slow-submission trace included two of the depth-pyramid pipelines. That trace covers many pipelines per submission and does not identify the command responsible for the hang. I have not seen a rendered world from this change. |
Drivers create pipelines from some modules the DXIL validator refuses (D3D12 checks only the container hash we write). The hand-assembled split and console-flow programs now go through dxil.dll's validator before pipeline creation, where one is installed. All of them pass. Prompted by a report on Marvisak#233 of pipelines created from modules that fail validation. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Thanks, this is the first result from real programs. The seven pipelines the driver created from modules that fail validation are the part I most want to fix: D3D12 checks only the container hash we write, so a driver taking them proves nothing. I could not reproduce it with what I have. Every hand-assembled program in
Messages and counts only, please, no shader contents. Two more things that would help decide what to do next, if they are cheap for you:
No game data used on my side. AI-assisted. |
|
Tested on a real dump, which the description says wasn't available. Two NVIDIA GPUs (RTX 5080 and RTX 3080, both D3D12 wave lanes 32..32); run on the 3080.
Of the 321 programs main emits with
No program that creates a pipeline on main fails on this branch (per-program comparison: 98 gained, 0 lost). Vertex, pixel and mesh results are identical. Tests on the RTX 3080 (
Not checked: whether the 98 newly created pipelines compute the right results in the title (no 64-lane reference adapter here, and the world isn't run). |
The loop form compilers emit keeps the lanes that are done in an exit mask that starts as 0 (s_mov_b64 s[2:3], 0; in the loop s_or_b64 s[2:3], vcc, s[2:3] and s_andn2_b64 exec, exec, s[2:3]). In the console flow every mask join is a phi, and its incoming values had to be masks derived from EXEC or a VALU result, so such a loop stopped with "a lane-mask join of an untracked mask". `Structured::others` gives the lane's bit of the other values read as masks (constants, uniform selects, opaque ones), and the console flow's mask joins take them. The per-lane form is unchanged. New test: a loop in that form with a lane read in every iteration and the exit mask counted afterwards. It was refused on an RTX 5070 before and is exact there (in two halves) and on a Radeon iGPU now. Found through the test report on Marvisak#233 that tried Marvisak#269's programs. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Drivers create pipelines from some modules the DXIL validator refuses (D3D12 checks only the container hash we write). The hand-assembled split and console-flow programs now go through dxil.dll's validator before pipeline creation, where one is installed. All of them pass. Prompted by a report on Marvisak#233 of pipelines created from modules that fail validation. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Thank you, this is the measurement the description could not give, and it orders what is left. What I will do with it. The 120 programs that stop with Three questions, counts and messages only, no shader contents:
No game data used on my side. AI-assisted. |
…d in the console flow Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Same setup (real dump, RTX 3080, 32..32), 1. Validation of the emitted compute modules Yes. On
2. Newer heads
So on this NVIDIA driver, modules that fail validation are accepted at pipeline creation (on main as well), and #320's head adds 20 of them. 3. Not run in the title yet. No game data shared beyond counts and validator messages. |
|
The follow-up I mentioned is up as #439 (head If you rerun, the numbers that would tell the most are the count per reason on No game data used on my side. AI-assisted. |
The validator's message for an operation the stage or the entry's
properties do not allow ("Entry function performs some operation that
is incompatible with the shader stage or other entry properties") names
neither the operation nor the property, and it is the only message when
the call is in the entry function itself.
`victory translate --validate` now adds to each validator failure what
our own module declares and calls: its thread-group size, its wave size
and its dx.op operations (`emit::last_module_summary`, kept per thread
when a module is finished). Nothing of the console program is in it, so
a report of counts per reason is enough to see what the refused modules
have in common.
Prompted by a report on Marvisak#233: modules that fail validation with that
message and still create pipelines, 20 of them new with Marvisak#320, which I
cannot reproduce with hand-assembled programs.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Thank you. That answers all three, and the second table is a real finding against #320: its head adds 20 modules that fail validation and still create a pipeline. They are the programs the exit-mask fix ( What I could and could not find. The message is the one the validator gives when the entry function itself calls an operation the stage or the entry's properties do not allow; with the call in the entry there is no second message naming it, which matches what you saw. I could not reproduce it:
So it is something real programs do that mine do not, and I would rather measure than keep guessing. A diagnostic to settle it. Nothing of the console program is in that line. If you can rerun Until then I have marked #320 and #439 as drafts and put this at the top of both descriptions. #233 itself adds no such module by your first table, so I have left it as it is. No game data used on my side. AI-assisted. |
|
Tested on a real title (the #348 machine): the split works – compute refusals drop from 103 to 1 – but world entry then fails in a new way: a crash inside NVIDIA's shader compiler while creating the large split pipelines, an Setup: Windows 10 21H2 19044.7846, RTX 3080 10 GB (driver 32.0.15.9649), Ryzen 9 7900X, 32 GB RAM (commit limit ~43 GB, ~21 GB free after the run). This PR's head What improved
The new failure (frame ~2194, first world frames): a burst of large split compute pipelines binds – DXIL sizes 66,596 / 57,268 / 65,916 / 65,044 B (hashes So the driver's compiler faults on (at least) one of the big split programs, one compute pipeline is refused for memory, and the run ends in a TDR on a 3.3 s mesh-heavy submission – the shape #71 describes. The remaining refusal is Possible next steps I can test on this machine if useful: Full log kept locally ( AI use: Qwen Code (underlying model name not disclosed by the tool) built the merged stack, ran the title, extracted the excerpts and drafted this comment at the user's request. |
|
Thank you. This is the first run where the newly accepted pipelines visibly go wrong in the driver, so it matters more than the improved counts. What I think is going on, and what is only a guess. Before this PR the driver rejected these programs up front for Two checks that would tell, if you have the time:
One question on the baseline: without this PR, does the same run on that machine also end in a device removal at world entry, or does it get past frame ~2194? Two other title runs (RTX 5070 Ti, RTX 5080, both Windows 11) end in the same device removal with and without this stack, so I do not know yet whether what you see is a regression on your driver or the same hang reached with more work in flight. On the optimisation level: VIctory writes DXIL itself, there is no DXC step to turn down. The split programs are larger because every vector instruction carries its EXEC guard; if size turns out to matter to this driver, that is where I would look. I have added this report to the top of the description so nobody merges without seeing it. No game data used on my side. AI-assisted. |
|
Four follow-ups on the compiler fault report, which would separate "our module is wrong" from "this driver's compiler", mostly without rerunning the title. For @justlovett0:
For @SlopComp:
Hashes, counts and messages only, please. No game data used on my side. AI-assisted. |
The 5 gained pipelines whose modules fail validation: Against the report's five: |
|
Tested Base: Pipelines on the 5090:
Whole-pack census (26,084 programs):
Barriers: I instrumented the translator over the whole shader pack and In game: two 7-minute runs, one cold cache and one warm, with no hang or fault. Dropped draws and dispatches without a host pipeline went from about 555–562 to 518 per frame. Frame time went from 630–670 ms to 570–600 ms. Tests under Wine on the 5090: the 12 split tests pass with exact results. The remaining Wine failures (22 in AI-assisted (Claude); measured on my machine, no game data shared. |
…and Marvisak#320) Conflicts in crates/victory-shader/src/emit/lower.rs, both sides kept: - main's scalar_def/sgpr_operand/scalar_constant helpers beside Marvisak#439's numeric(); - Marvisak#439's console_read_lane beside main's helper-lane doc of helpers_read; - main's uniform_join beside Marvisak#439's never_taken (false in the console flow); - the lane-mask phi: main's number-at-a-uniform-join and no-lane-on-edge arms, with Marvisak#439's console-flow `other` masks as a fallback for the tracked mask; lane_bit now returns a Result (Marvisak#439), refused in a split program outside the console flow. Tests main added since Marvisak#439's base get Marvisak#439's new Parts fields and emit's Target argument (memory_tests heap test, mod.rs pixel-input test). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The one conflict was in apps/victory/src/main.rs, where main's `--jobs` became a `NonZeroUsize` and the branch added `--host-lanes`: `translate::run` takes both, `jobs.map(NonZeroUsize::get)` as main passes it and the branch's `host_lanes` after it. The `emit` and `lower::Parts` call sites main added in tests (census, crosslane, memory, synthetic, `emit::tests`, `resource` and lower.rs's own) pass `Target::ANY`, as the earlier merge did for the ones before them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A pure move, so that the merge of main (63bcca4) keeps emit/lower.rs under the asset policy's 512 KiB limit: the inline `mod tests` becomes `mod tests;` beside `mod bvh;`, and its body, one indent level less and otherwise unchanged, is emit/lower/tests.rs. Its `super::` paths still name `lower`. Moving the tests out of lower.rs is desplmfao's idea (Marvisak#2309). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… flow Conflicts, resolved with kawaii-shakal's notes on Marvisak#439: - emit/host.rs: main's process-wide WARP device (`SharedDevice`, `WARP_LOCK`, `lock_warp`, `from_device`) is kept, and its `create_device` takes an optional adapter for the branch's `VICTORY_ADAPTER` and `Host::on`. - emit/lower.rs: `console_read_lane` stays beside main's new `helpers_read` doc; main's `uniform_join` sits above `never_taken`, which keeps the branch's console-flow note. - Lane-mask joins: main's path for data joined with masks at a uniform join (the BVH walks pop masks from memory) stays beside the console flow's masks; `lane_bit` now returns a `Result`, so it takes `?`. `no_mask_lane_on_edge` is kept out of the console flow, whose lanes go along the wave's edges. - emit/lower/tests.rs (lower.rs's tests, moved out before this merge): main's test changes are ported there. Its `lowers` helper calls `lower` directly, so it now lowers a program again in the console flow when the first try asks for it, as `emit_with` does (`a_scalar_result_needs_no_exec`). - The `lower::Parts` sites main added in tests (crosslane, memory, synthetic, lower's) pass `console_cf: false`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged current Synthetic tests only; no title data used. AI-assisted |
Main's view-mark test builds emit::Options by hand; this branch adds a target field to Options, so the test now fills the rest from Default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Correction to my last comment: CI's clippy failed on the previous head. Main's view-mark draw test ( Verified on #223 AI-assisted |
Main's placed-UAV diagnostics test calls emit::emit with the six arguments it had before this branch added the target. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Second follow-up: CI's diagnostics clippy ( Verified on #223 AI-assisted |
|
On the triage at
AI-assisted |
|
I adapted the single-wave console control flow from this PR to the native Linux runtime's shared-memory emulation. The retry covers both console Wave32 and Wave64 with one logical wave per workgroup. It keeps EXEC on vector instructions and uses the whole logical wave to decide scalar branches. On an eight-lane Lavapipe device, matching compute shader identities across two Series S loading runs showed 179 previously rejected shaders created host pipelines. All 419 previously working compute keys still created pipelines. The native shader suite passed 99 tests. The new readbacks cover inactive-lane sources, first-active-lane selection, and a loop that ends when its last lane finishes. Native test commit Tested-on: Fedora Linux 45, Xeon E5-2670 v3, Mesa Lavapipe 26.2.7 with eight-lane subgroups, native VKD3D-Proton |
Current head
87d1f423, which mergesmain63bcca4(no rebase or force-push); CIcheckis green on it.19f63196moves lower.rs's inline tests, unchanged, intoemit/lower/tests.rs, so lower.rs stays under the 512 KiB file-size limit withmainmerged in; that move is the bulk of the diff and changes no code. The design notedocs/wave64-on-wave32.mdwas removed in691ff20; a short summary is indocs/architecture.md. Merge notes and per-level checks: #439. The older notes below name the heads they were written for. AI-assisted.Stacked on #223 (its commit is the first one here); review that first.
Rebased onto
main8e79c80on 2026-11-24 (twice that day; upstream merged about 55 PRs and added CI; new upstream tests needed the argument #223 adds and the field this PR adds tolower::Parts, fixed in the commits that introduce them). CI's two clippy commands (-D warnings, with and without--all-features) are clean at this head. CI's first run on these PRs failed in tests, not in clippy: GitHub's runner has no GPU and lists Windows' software renderer (4-lane waves) as an adapter, and tests here assumed every listed adapter runs 32-lane waves. The tests are fixed where they were introduced: the hardware-adapter list leaves that renderer out by its ids and name, and the one test that takes the default device accepts a host without 32-lane waves. No translator code changed. Headdd3c08c, was3098672; the six commits here are replayed unchanged. Ids in testers' reports are from before the rebase:727e884is now63f197d,3098672is nowdd3c08c.What
Console wave64 compute programs that depend on the lane layout run on hosts without 64-lane waves (NVIDIA: D3D12 range 32..32), as two 32-lane waves per console wave. Two forms, picked per program:
In-half split. A program whose cross-lane reads are only DPP and
ds_swizzle(reads within 16, 8, 32 or 4 lanes), with no mask read whole, no LDS and no whole-wave sections, declaresWaveSize(32). It uses the existing thread relabelling, and DPP row masks name the console's rows.Console flow, for groups of at most 64 threads (one console wave) without LDS. Every lane runs every block, as on the console:
structure::structure_consolebuilds the per-lane booleans without resolving mask joins from what arriving lanes know (every lane arrives), andStructured::execsgives the lane's EXEC bit at each vector instruction.v_readlane,v_writelaneandv_readfirstlaneignore it, as on the console).s_cbranch_*: EXEC, VCC and mask-operation SCC tests are taken for the whole console wave, from both halves' ballots.s_bcnt1,s_ff1, scalar compares) are the exchanged ballots.v_readlaneandv_readfirstlaneread the owning half;v_writelane,v_mbcntand mask bit tests use the console lane.lowertries the per-lane form first. A program that needs the console flow stops withCONSOLE_FLOWand is lowered again from the console structure.Also:
emit::host::Host::on(name),adapters()andVICTORY_ADAPTERfor tests, so a machine with two GPUs can run each test natively (64-lane adapter, the reference) and split (32-lane adapter).docs/architecture.mdsummarizes the design (the longerdocs/wave64-on-wave32.mdwas removed in691ff20).Nothing changes on hosts that run 64-lane waves.
How this relates to other open PRs
ds_swizzle-only programsWaveSize(32), like the in-half split here (and on 64-lane hosts too), and orders single-wave LDS with barriers, which this PR does not do. It has no cross-half exchange. Its DPP row-mask handling caught a bug in an earlier version of this branch, fixed in727e884.WaveSize(32)for groups of at most 32 threads and resolves SGPR spills in SSA. Groups of 33 to 64 threads, which this PR handles, stayWaveSize(64)there.VICTORY_ADAPTERwith the same meaning to the shader test host. If it merges first, the adapter helpers here move onto its API.Not verified
No game files and no console hardware were used. The expected values in the tests follow the ISA's EXEC,
v_readlane, ballot and DPP semantics, checked against the native form on an RDNA2 GPU where that form is right. I did not measure how many of the title's programs each form covers. Testers did, on their own copies: the counts are in the note at the top (98 of the 321 compute programs a 32-lane driver refuses onmain).The console flow runs both halves through every block, guarded, so a divergent program costs more than in the per-lane form. Each exchange is two group barriers. Not measured on real shaders.
Not covered yet: groups of more than 64 threads that need an exchange, LDS in split programs, whole-wave sections,
ds_(b)permuteacross halves. These still stop at translation with the reason from #223.Tested
Windows 11, an NVIDIA RTX 5070 (32..32, split) and an AMD Radeon iGPU (RDNA2, 32..64, native) in one machine. Hand-assembled GFX10 programs run on every hardware adapter (
emit/split_tests.rs), every lane checked against the console's result:In-half:
ds_swizzlexor 16 plus DPProw_mirror, in groups of 32, 64 and 128 threads and 3-D groups 4x4x4, 8x8x2, 2x4x8, 16x2x4, 8x8x4 and 4x8x8. Exact on both, so the thread relabelling holds on this NVIDIA driver for all of them. DPProw_mask:0x3: exact on both; it failed on the RTX 5070 before727e884.Console flow, exact on the RTX 5070:
s_bcnt1of lanes below 40 in groups of 64, 48 and 32 threads;v_readlane40;v_readlaneinside a branch only lanes below 20 take (the upper half has no lane there);v_readlane40 in every iteration.The last one is wrong in the per-lane form on the Radeon (Shaders: v_readlane inside a loop the lanes leave at different iterations reads wrong lanes (wave32 and wave64, every GPU) #225), so that test checks 64-lane hosts only for the other cases.
A 128-thread program that needs an exchange still stops at translation on 32..32.
Merged with Shaders: integer memory atomics and sub-dword buffer accesses #164 (64-bit LDS atomics): the exchange's group-shared slots and its LDS compose, and all tests pass once Shaders: integer memory atomics and sub-dword buffer accesses #164's new test passes the
Targetargument.cargo test --workspace: 278 passed, 0 failed, 4 ignored (at3098672, which adds thev_readfirstlanefix and its test).cargo clippy --workspace --all-targets: nothing new.cargo xtask policy: ok. Each commit builds on its own.The approach of pairing two 32-lane waves through group-shared memory follows XCL's design notes (
docs/wave64-on-wave32.mdin ivall/xcl, GPL-2.0-only); no code from XCL or its forks is used.AI-assisted; no game assets were used.
🤖 Generated with Claude Code