Shader tests: a cross-half UAV ordering probe under Emulate (#3766) #3874
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3874"
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?
Imported from Marvisak/VIctory. Originally posted by omarsaifuddin on 2026-11-30T06:34:28Z.
Stacked on #189 (base
3e39e34). The change is the last commit; the rest of the diff is #189's branch.What
An ignored probe for the Emulate form of #3766, ported from ColorMeBoom's
probe/main-uav-order(itself neonbyte1'suav_write_then_read).Lane
writerof each console wave stores 1 + a dword only it loaded to its wave's slot; lanereaderthen loads the slot. On the console the reader sees the store: both lanes are in one wave and the instructions are in program order. The probe runs it underWave64Mode::Emulatefor three programs — no lane reads, plus a DPP op, plus av_readlane— on every NVIDIA adapter. The DPP and readlane forms declareWaveSize(64)on main and never build on a 32-lane host; under Emulate they translate and run.Measured (RTX 3070 Ti, Windows 11, driver 32.0.16.2140, wave 32..=32)
Stale reads per reads,
PROBE_RUNS=64, one group per dispatch. Writer in the high half, reader in the low half:v_readlaneunwritten slots 0), so this is read reordering, not a lost store.v_readlaneforce isbarrier(1 | 8): it fences LDS, not device memory, so it does not help.On main the same probe gives the same pattern for the no-lane-read program (w40 -> r5: 64/64, 243/256, 595/1024), so the gap is not Emulate-specific in outcome — only in reach, since Emulate is what translates the wave64 programs on this host.
Running it
It is
#[ignore]d because it demonstrates the bug; it should be un-ignored, or its counts asserted, once a fix lands. A fix for #3766 needs to cover this form: abarrier(2 | ...)at a group-uniform point, or neonbyte1's meeting/console-flow approach.Credit: the program and instruction words are ColorMeBoom's probe in #3766, ported from neonbyte1's
suggest/uav-order-all-forms.Imported from Marvisak/VIctory. Originally posted by Auroraooy on 2026-11-30T12:38:33Z.
Turing data point for this probe, from an RTX 2080 Ti. Same qualitative result as your 3070 Ti, with one difference in how the cross-lane-op forms compare to the no-op form.
Machine: RTX 2080 Ti 11 GB (Turing, SM 6.6 only via Agility SDK 1.620.2, driver 595.79), Core Ultra 7 265K, 96 GB RAM, Windows 10 19045, Rust 1.98.1 MSVC. Head
7e1f056.PROBE_RUNS=64, one group per dispatch,--ignored --test-threads=1.Getting it to run at all on this box:
Host::all_adapters()creates each adapter's device with the inboxD3D12CreateDevice, which reports SM 6.5 on Turing under Win10 and skips every adapter. I routed that call through the Agility factory loader locally (uncommitted,VICTORY_D3D12_DIR→ 1.620.2) — the same SM 6.6 gate as #3033. Without it the probe printsskipped: the device supports SM 0x65 onlyfor all three adapters.Stale reads per reads, writer in the high half, reader in the low half (w40 → r5):
v_readlaneSame-half pair (w5 → r6): 0 stale in all nine rows, both runs. Reverse direction (w5 → r40): 0 / 64, 0 / 256, 64 / 1024 for all three programs.
unwritten 0everywhere, so every store landed — read reordering, not a lost store. Consistent with your conclusion that the group-sharedbarrier(1 | 8)fences LDS and not device memory.Two notes that may matter for a fix:
v_readlane. On your 3070 Ti the ordering is the other way round (735 and 650 vs 594 at 1024). Turing at 256 threads is also worse than Ampere there (100% vs 96.5%), so Ampere is not the worst case for the fix to clear.Probe log kept locally. Disclosure: run and comment written with GLM (Z.ai) on the machine owner's box, reviewed before posting.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.