tests: use host capabilities for wave64 VALU fixtures #276
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/Belobug--VIctory-Belobug-AMD!276
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-276"
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?
@KernelSmoker on GitHub · 2026-11-26 18:42 UTC · original
KernelSmoker:codex/fix-nvidia-wave64-test-target→main· +46 −9 · 1 files · 1 commits · openSummary
The four wave64 VALU tests reported in Belobug/VIctory-Belobug-AMD#259 built their fixture with
Target::ANY, even when the selected D3D12 adapter only advertises wave32. This made the tests submit an unsupported wave64 pipeline to NVIDIA instead of asking the translator to apply that host's wave limits.Build these fixtures using
Host::target(). Skip only when translation returns the explicitconsole wave64 lanes on a host without 64-lane wavescapability refusal. Other translation errors still fail, and adapters that accept translation still must create the PSO and pass readback assertions.Validation
cargo check --offline -p victory-shader --tests --target x86_64-pc-windows-gnu— passed; Windows test code type-checks.cargo test --offline -p victory-shader --lib— 196 passed, 0 failed, 6 ignored (Linux CPU suite).@TinkerBell-90 on GitHub · 2026-11-26 19:18 UTC · original
Tested on an RX 9070 XT, but under Linux: Wine 10 + vkd3d-proton 3.1 (with DXVK's dxgi), Mesa 26.0.8 RADV. Not Windows, and nothing was run in game. The D3D12 device reports waves of 32 to 64 lanes here.
a22c81c, the four tests run and pass on the card; none is skipped. They also pass onmainat4f62c2a.build_lanes_cs_for_hostlocally to useTarget { lanes_min: 32, lanes_max: 32 }(what an RTX reports) instead ofhost.target(). Thenscalar_counted_in_a_divergent_loop_read_after_itandscalar_counted_in_nested_divergent_loopstranslate and pass, butloop_exit_mask_counted_after_the_loopandmask_grown_inside_a_branch_counted_after_itpanic at translation:That is
lower::CONSOLE_FLOW, not the "console wave64 lanes on a host without 64-lane waves" refusal the skip matches, so on a 32-lane card two of the four would still fail, at translation instead of at pipeline creation.build_lanes_cscallslower::loweronce, while the real path (emit_programinemit/mod.rs) answersCONSOLE_FLOWby lowering again with the console structure. With the same retry in the fixture, and the forced 32-lane target, all four translate and pass on the card:What the card ran, read from each shader's PSV0 part: the two retried tests declare waves of 32 to 32; the other two declare no wave size, and they also pass with
RADV_PERFTEST=cswave32(compute shaders without a declared size then run in 32-lane waves). So the fixture can likely run on 32-lane cards instead of being skipped there. Not checked on an NVIDIA or Intel card; RADV in 32-lane waves is the closest I have.emit_programalso falls back toper_lane_onlywhen the console structure fails; these four did not need it.AI-assisted.
@Aniseto on GitHub · 2026-11-26 22:20 UTC · original
Ran the four wave64 VALU fixtures from issue #259 at
a22c81con a physical NVIDIA 32-lane part:Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, Rust 1.98.1 (pinned by
rust-toolchain.toml), MSVC 14.44.35207, DXC 1.9.2609.5 (shared env), debug build;VICTORY_D3D12_ADAPTER=NVIDIA.All four still fail on this adapter. Two panic at translation with
Unsupported { offset: 0, what: "a wave64 program whose halves exchange lanes (console flow)" }; the other two run but count 32/64 iterations where the assertions expect the other half to be included. The thread's prior run was on an RX 9070 XT under Linux/Wine, so this is the first native Windows NVIDIA result. I am reporting the measured failures only, not a review verdict.Not tested: a retail title, a paired smoke run, the full workspace suite, release profile, AMD and Intel GPUs, native wave64 hosts, Wine, game data.
AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.
@upipibi on GitHub · 2026-11-26 23:25 UTC · original
Ampere data point with a base control, adding to Aniseto's RTX 5070 Ti run: RTX 3070 8 GB, driver 616.56, Windows 11, debug, default hardware adapter. Head
a22c81c, base4f62c2a(merge-base with main). No game files used.cargo test -p victory-shader --lib -- emit::valu_tests::loop_exit_mask_counted_after_the_loop emit::valu_tests::mask_grown_inside_a_branch_counted_after_it emit::valu_tests::scalar_counted_in_a_divergent_loop_read_after_it emit::valu_tests::scalar_counted_in_nested_divergent_loops --test-threads=1 --nocapture0 passed; 4 failedeach time, with no skip line. This is the same as on the 5070 Ti. The two mask tests panic at translation (valu_tests.rs:1441) with theconsole flowrefusal, which the skip doesn't match.scalar_counted_in_a_divergent_loop_read_after_itcounts 32 in lanes 0-31 and 64 in lanes 32-63.scalar_counted_in_nested_divergent_loopscounts 8 and 16.0 passed; 4 failed, but two of them fail differently. The two mask tests fail atcompute_pipelinewith "The parameter is incorrect." (E_INVALIDARG, valu_tests.rs:1447 and :1526), and the two scalar tests give the same wrong half-wave counts.So on a 32-lane NVIDIA card, this PR moves the two pipeline failures to translation failures and leaves all four failing. The scalar counts are wrong with or without it. I haven't tried TinkerBell-90's fixture retry with the console structure. Since the two scalar tests already translate here and still count wrong, I'd guess it helps only the two mask tests on this card. Lib suite on both trees:
273 passed; 4 failed; 6 ignored, the same four tests failing.AI-assisted (Claude Code, Claude Sonnet 5.5 ran the tests; Claude Opus 5.5 checked and posted).
@WellyngtonSantos on GitHub · 2026-11-27 13:08 UTC · original
A heads-up from trying this on the current default branch: it targets
main, which is still at4f62c2a. Recent merges, #290 included, go toa-publier, and the two branches don't share history, sogit mergerefuses (refusing to merge unrelated histories). Cherry-pickinga22c81contoa-publier4eb6cfdconflicts invalu_tests.rs, andbuild_lanes_csand theconsole wave64 lanes on a host without 64-lane wavesrefusal it matches are no longer there.So this would need redoing against
a-publierto land. For the other side of the same problem, hosts with 64-lane waves only: #290 (merged) skips theWaveSize(32)pipelines on such a device, and on an RX 580a-publierrunsvictory-shaderat 303/0. I can run a rebased version on that card if useful.@gut0to on GitHub · 2026-11-27 14:37 UTC · original · reviewed
AI-assisted static review (ChatGPT); I traced the error paths but did not run tests.
@ -1486,3 +1508,2 @@];let shader = build_lanes_cs(&body).unwrap_or_else(|e| panic!("translation: {e}"));let host = Host::new(false).unwrap();let Ok(host) = Host::new(false) else {@gut0to on GitHub · 2026-11-27 14:37 UTC · original
Could this skip only the expected no-device or unsupported-wave cases and let other
Host::new(false)errors fail the test? That constructor also propagates adapter/device creation and feature-query errors, so thislet Ok(host) ... else { return; }reports those regressions as a passing “no SM 6.6 hardware” skip. A narrow classification would keep unsupported runners green without masking D3D12 initialization failures.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.