Run wave64 compute programs in a paired form on 32-lane hosts (port of fxceless#854, stacked on #61) #64
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/DexNom--VIctory!64
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-64"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Castyan on GitHub · 2026-11-26 02:55 UTC · original
Castyan:wave64-paired-form→main· +6358 −1462 · 40 files · 27 commits · draftStacked on #61. This branch holds #61's commits (up to
6684db0). The changes to review are the last two commits,40c2f29anda65db62. I'll rebase once #61 is merged.What
This ports
26600c6from fxceless/victory-fork#854 by @PiloteCode: wave64 compute programs run in a paired form on hosts with 32-lane waves only. Each console wave runs as one host wave of 32 lanes, and each thread does the work of two console lanes (n and n + 32). The whole wave takes every per-lane branch, with EXEC as each lane's guard. Lane reads, permutes, lane masks and reductions cover both halves through the host wave's own operations. The paired form is tried after every other form, for a wave64 program the host still refuses.VICTORY_WAVE_PAIRS=0turns it off. All credit for the technique goes to PiloteCode. Any mistakes in the port are mine.#61 got 22 of 31 wave64-only compute pipelines working on the RTX 5060. All 9 left need this form. 7 of them have groups of 128 to 1024 threads and read and write LDS inside lane branches. The other 2 are the BVH builder programs.
The commit is the whole of
26600c6, so it also brings in that commit's other parts: mesh programs over 32 KiB linked with their pixel program (emit/link.rs,pipeline/host.rs,VICTORY_MESH_LINK=0), signature row order, 64-bit floats (float64.rs), descriptors read only for their size (descriptor_data.rs), whole-wave sections that a jump splits, and the other changes listed in its message.Adapted to this branch
scalar_built()and thev_readfirstlaneown-lane read.lds_subtract()withModule::negated(). #854's own LDS subtraction loop is left out.emit_forms, before the paired retry.pops.rs.descriptor_data.rsand run first. #854's unused-descriptor path runs only where this branch used to refuse.ir::without_pops_wait,Shader::orderedand their tests). It would have run alongsidepops.rs.a65db62): the paired form also takes the ray-tracing structure builder's two programs. These programs exchange data across the console wave's halves. The per-half form got that wrong and hung NVIDIA GPUs in Marvisak/VIctory#2711. The paired form keeps both halves in one host wave. The builder still runs only whenvictory-gpuallows it (VICTORY_BVH_BUILDER=1orVICTORY_RAY_TRACING=1) and every builder pipeline has a host pipeline. By default its dispatches are still dropped, so this commit changes nothing at run time unless that switch is on.lib.rs.a_mask_parked_in_lanes_…now checks only the shared build: on this branch, the mask built alone is no longer opaque.USER_VIEW_RECORDSroot word, as the runtime does.Results (RTX 5060, 32-lane waves)
victory translate --validate --pipelines --listover the 31 wave64 compute containers from the RTX 5060 preload.VICTORY_DATA_DIRandVICTORY_CACHE_DIRpointed to empty scratch folders. All 31 validate in both builds.6684db0)02384a60fda6f2d01d434307d981352a22338086ea4c53642da4beb386509b773b02415f67c6b0d86832a9da15c2e5846b82bc7d22016cb528918b7150a7aad5(BVH builder)caa78b8ca62bc3d6(BVH builder)Total: 31 of 31 created (was 22). With
VICTORY_WAVE_WHY=1, exactly the 9 programs above reportWAVE64-RETRY paired lanes: wave Some(32).Checks (local, Windows, since CI here waits for approval)
cargo clippy --workspace --all-targets --locked -- -D warnings: cleancargo clippy --workspace --all-targets --all-features --locked -- -D warnings: cleancargo test --workspace --lockedwithVICTORY_TESTS_ALLOW_SOFTWARE_SKIP=1: 719 passed, 0 failed, 11 ignored. This includes #854's on-card tests of the paired form against the console's 64 lanes.Not verified
The BVH builder with
VICTORY_BVH_BUILDER=1. Its programs now get pipelines, but the builder has not run in game on this card. That run is where the #2711 hang would show up.Gameplay. No run of the title with these pipelines yet. A pipeline that gets created is not proof that the program computes what it should in the game. This needs a play test on the RTX 5060.
The rest of
26600c6(mesh linking, interpolation and signature changes, 64-bit floats) was checked only by the test suite and this compute set. I did not run the full shader pack through it.AMD (64-lane) hosts should be unaffected, because the paired form is only tried when the host's largest wave is 32. I have not checked this on an AMD card.
🤖 Generated with Claude Code
@Castyan on GitHub · 2026-11-26 03:28 UTC · original
In-game test on the RTX 5060 (build
40c2f29)Two runs with the preload launcher from #47, using a fresh test folder.
02384a60fda6f2d0,2da4beb386509b7702384a60fda6f2d0,2da4beb386509b77,6b82bc7d22016cb50xc0000005at+0x23cf683Prestream: title breakpoint0x80000003at+0x5149aec, crash reportINSTANCE_LIST: 44997/45000Both endings are crashes that
docs/nvidia-rtx5060.mdalready records on builds without this PR:Prestream, with the instance pool full (Marvisak/VIctory#698).Neither ending points at the paired form. Both runs show no device removal and no shader error before the crash.
Not seen yet: the other 4 paired programs never ran before the intro ended. The game ran at about 0.5 fps during
Prestream. I have not checked rendering on screen.@Castyan on GitHub · 2026-11-26 05:05 UTC · original
Status: device method 0x218 (native compute pipelines)
A follow-up commit is ready locally on
wave64-paired-formbut not pushed yet. The PR head is stilla65db62.3a9874cMake compute pipelines from programs the title compiled itself (device method 0x218)E_NOTIMPLwith a null output.s_bfm_b32and a 64-bits_movof a literal (zero-extended). These two instructions build the programs' fixed sampler; without them the tracer lost the sampler's origin and the pipeline was refused.Checks (RTX 5060)
cargo clippy --workspace --all-targets --locked -- -D warnings(with and without--all-features)cargo test --workspace --lockedOpen points
victory-gpu --libwithout a result. It passed on both reruns, alone and as part of the full suite, so it may be a flaky test.🤖 Generated with Claude Code
@Castyan on GitHub · 2026-11-26 05:22 UTC · original
Report: three commits pushed (
a65db62..a971716)3a9874cMake compute pipelines from programs the title compiled itself (device method 0x218)E_NOTIMPLwith a null output.s_bfm_b32and a 64-bits_movof a literal. These two instructions build the programs' fixed sampler; without them the tracer lost the sampler's origin and the pipeline was refused. The literal is zero-extended, which is what the hardware does for a binary 64-bit operand (LLVM PR #70274).17b34d2Restore the shortcut note on 0x1c8 and classify native_build.rs in ordershortcut:note, which3a9874chad dropped.native_build.rsto its sorted place in the list of sources outside translation, with the reason it is there: it only writes containers, which are hashed like any other.a971716Wait for the heap to go before the in-place test gives its pages backcargo test -p victory-gpu --libfailed about 2 runs in 15 with an access violation or a failed assertion ininplace::tests. It already did so ona65db62.VirtualFreereturnedERROR_INVALID_PARAMETER. The test now retries for 2 s at most and checks that the final release succeeds. The library then passed 40 runs out of 40.VirtualFreethat lands right after an in-place heap is dropped (title_memory_freeing) could be refused the same way. Not addressed here.Checks (RTX 5060)
cargo clippy --workspace --all-targets --locked -- -D warnings(with and without--all-features)cargo test --workspace --lockedcargo test -p victory-gpu --lib, 40 runs in a rowThese commits have not been run in game yet.
🤖 Generated with Claude Code
@Artking175 on GitHub · 2026-11-26 05:34 UTC · original · edited 2026-11-26 05:35 UTC
Independent RTX 2060 check on pinned
a97171618112102dbf1ec950ec6256e78788254e, using one binary and toggling onlyVICTORY_WAVE_PAIRS. Windows 10, driver 531.41, Agility 1.614.1 through the #12 loader overlay, native wave32. Both modes rantranslate --jobs 1 --validate --pipelines --list.XboxBvhBuilder.dllThe two recovered builder container hashes are
3297538b1176c897and138a77fa89f35ae4. No pipeline that worked with pairs off was lost in this set. All sixemit::wave64_testscases matched by the paired filter passed, with no hardware skip messages. This test covered offline pipeline creation and synthetic GPU readback.An earlier DexNom prologue capture on
2e01ab4recorded refusals for two of the seven restored compute programs,02384a60fda6f2d0and2da4beb386509b77. This identifies two concrete dispatches to check in the next RayTime capture.@Castyan on GitHub · 2026-11-26 05:47 UTC · original
Ty @Artking175 for your independent test, i'm still working on it
@Castyan on GitHub · 2026-11-26 06:26 UTC · original
Report: in-game runs, decoder fixes pushed (
a971716..88f8f9a)The 0x218 path was run in game (RTX 5060, BVH builder off, fresh cache and saves).
First run with
3a9874c: about 512 pipelines were made and over 1024 descriptions were turned down. Nothing said why, so88f8f9aadds the reason to the log, plusVICTORY_DUMP_NATIVE=<folder>to save turned-down descriptions in the format the replay tool reads. Real descriptions captured that way showed four misreadings in the decoder:9eac44aRead 0x218 resource tables as the title writes themCOMPUTE_PGM_RSRC2user-SGPR count. The u32 before it is the stride: 0x10 or 0x20 for structured buffer SRVs, 4 for images, as in the title's own containers. With the swap, the CBV of every accepted mip-generation program, including the five original captures, named user-data dword 0 instead of the table in dword 4. That wrong pipeline was built without any error. A root parameter that names user data the program does not have is now refused.v_mul_f32 v7, s5, v7). Each now becomes a root parameter of size/4 SGPRs, with no used resource.Result in game: over 2048 pipelines made, 32 to 63 descriptions turned down. Of the eight descriptions captured in game, all now decode and four reach a hardware pipeline. The other four stop at translator limits (
a descriptor changed after loading,an address with two computed terms). The five earlier captures still pass.Still open
a descriptor outside the heaps,a descriptor changed after loadingand partial image or typed-buffer stores.a971716fixed the failed assertion in the in-place test but not the access violation incargo test -p victory-gpu --lib. The 40 clean runs were a lucky streak. The crash is still there, about 1 run in 50 when the GPU is idle and 2 to 4 in 40 under load, and it already occurs ona65db62. Comparing four crashes narrows it to about 100 candidate tests; skipping the in-place probe does not remove it. Finding it needs a crash dump (cdb or WinDbg).Checks:
cargo clippy(with and without--all-features) andcargo test --workspace --lockedpass.🤖 Generated with Claude Code
@Artking175 on GitHub · 2026-11-26 06:28 UTC · original
I ran the prologue game A/B on RTX 2060 with one release binary at the pinned
a971716revision from my earlier offline report and onlyVICTORY_WAVE_PAIRSswitched. Windows 10, driver 531.41, Agility 1.614.1, Series X with RT off. Both modes reached the heavy scene. The paired run logged a host PSO for2da4beb386509b77. I found a first-bind line for it in the control, but no corresponding host PSO creation line. None of the seven target compute hashes appeared as a dispatch in the six sampled frame command lists per run. Both sets of captures stayed nearly black. The paired run also got a second Enter before the heavy scene, so the visual timing is limited.Your
88f8f9aupdate is newer than this A/B. For a follow-up against that head, I'd count actual recording of the target dispatches by hash alongside the new 0x218 refusal and replay diagnostics. A PSO-creation line and a dispatch counter would tell us whether the paired wave path is reached during the prologue independently of the decoder changes. A fixed capture point and one verified profile confirmation per run would make the pictures easier to compare.The reported intermittent GPU-suite access violation predates this PR on
a65db62. I'd keep its dump-based isolation separate from the paired shader acceptance result.@Castyan on GitHub · 2026-11-26 07:08 UTC · original
Progress since
88f8f9a(work in progress, nothing pushed yet)Three follow-ups are running in parallel, each on its own local branch based on
88f8f9a. They will be merged and validated together before anything is pushed here.Root descriptors in 0x218 tables (
d01a06a, branchtype-racine)s7:s8(s_mov_b32 s20, s7,s_mov_b32 s21, s8, thens_buffer_load_dword … s[20:23]).Translator, on 0x218 programs (
cffdc06,93da0c6, branchtraducteur-218)exec_loalone, keeps scalars invcc_hi, and uses VGPRs exactly up to the 32-lane count ofCOMPUTE_PGM_RSRC1. Read as 64 lanes, av_cmpwritings[15:16]overwrote a descriptor ins[16:19], which caused "a descriptor changed after loading".OOB_SELECTto raw. The tracker now takes the rewritten descriptor as the load's. An access by index or format through it is still refused.The intermittent
victory-gpu --libaccess violation (branchviolation-acces)d3d10warp.dllitself when two tests use the software adapter at once, and makes WARP tests take turns. It also fixes a race inwatch.rs, where a view guarded by a concurrent refresh stayed read-only.#61 on its own
6684db0was checked alone: both CI Clippy passes are clean.cargo test --workspacefailed only on the known in-place decommit race atinplace.rs:1402.a971716cherry-picked on top (local8cdfc63oncombined-preload-pops, not pushed), the whole workspace suite passes.🤖 Generated with Claude Code
@Castyan on GitHub · 2026-11-26 07:08 UTC · original
@Artking175 thanks for the RTX 2060 A/B and the careful write-up (re: #64).
I agree with the split. The runs on our side don't answer whether the paired wave path is reached in the prologue either. They were about device method 0x218, and we didn't count dispatches of the seven target hashes or keep frame captures. So your result stands as is: the paired run creates a host PSO for
2da4beb386509b77, the control doesn't, and the sampled command lists show no dispatch of the seven targets.For the follow-up against the newer head, your proposal is the right measure:
VICTORY_DUMP_NATIVE=<folder>to save turned-down descriptions for offline replay. They tell us about the decoder, not about the paired path.On the access violation, agreed as well: it predates this PR (
a65db62) and is being isolated with dumps on its own branch, apart from the paired-shader result. A likely cause is two tests drivingd3d10warp.dllat once (avatarmanz/VIctory-7900XTX@160d222). If that is confirmed, it would go to #61 too, since the same tests are there.One note for reading the
88f8f9ahead:9eac44achanges which user data 0x218 programs read their descriptors from (the CBV used dword 0 instead of the table in dword 4). It can change what those passes draw, but it doesn't touch the paired form, so it shouldn't affect the A/B on the seven targets.🤖 Generated with Claude Code
@Artking175 on GitHub · 2026-11-26 07:27 UTC · original
I opened the dispatch-count follow-up against your
wave64-paired-formbranch: https://github.com/Castyan/VIctory/pull/3On RTX 2060, the same release executable reached the prologue in both modes and both lost the D3D12 device with
0x887a0005. The fatal snapshots had zero attempts and recordings for the seven selected target hashes. A separate hash,7d460e9b7accbe81, showed 18 indirect attempts and zero recordings with pairs on.Offline on that executable, both modes still validated all seven target shaders. With pairs off, 0/7 hardware PSOs were made. With pairs on, 7/7 were made. This isolates the earlier pipeline creation result from the game session, which ended before those commands were recorded.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.