Skip to content

Tests: fix three expectations behind the split wave64 failures on main (#3093) - #3163

Closed
tiagonleal wants to merge 3 commits into
xcl-dev:mainfrom
tiagonleal:recompiler/split-wave64-tests-3093
Closed

tiagonleal wants to merge 3 commits into
xcl-dev:mainfrom
tiagonleal:recompiler/split-wave64-tests-3093

Conversation

@tiagonleal

Copy link
Copy Markdown
Contributor

Part of #3093 (group 2). Test-only. On main e429936c six GPU tests fail since #2959 on NVIDIA (wave32) and AMD. On an RTX 5070 Ti all six come from the tests' own expectations, and none from the runtime. One commit per cause:

What is in it

  • split.rs (test module): the three dispatch_chain_* tests search the disassembly for ResBind { i32 0, i32 2, i32 2, i8 1 }. Title memory is raw_uav(2 + k, 0) (kernel.rs), which disassembles as { i32 2, i32 2, i32 0, i8 1 }, so the string never matched. The pruning that 2b39525 added works: the binding is in 2 of the 4 pieces. One string changes; both assertions stay.
  • tests.rs: gpu_compute_mode_dispatch_abi and gpu_float_cas_uses_ieee_equality unwrapped the direct DXIL translation. dbe6b30 makes the direct path refuse split wave64 LDS on purpose (its own test the_runtime_path_leaves_split_wave64_lds_to_hlsl checks that) and production falls back to HLSL on that error (pso.rs). When the program is split, the tests now assert that exact refusal and run the HLSL backend only. On native wave64 the direct path must still succeed, as before.
  • heap_window_tests.rs: gpu_heap_flat_reads_match_guarded_and_root_output expected 0 for a vector read outside the UMA with one window. With one window there is no window check (Lw::windowed() is mems.len() > 1), so the address aliases window 0, and the test already expects that for its scalar read. The vector lane now expects the same.

Tested

  • Windows 11 Pro 10.0.26300, NVIDIA GeForce RTX 5070 Ti 16 GB (driver 617.42), AMD Ryzen 7 9800X3D, 32 GB RAM, rustc 1.100.0, debug
  • On main e429936c: the six fail (0 passed; 6 failed). With this PR: cargo test -p xcl --lib -- gpu::dxil::module::split dispatch_abi float_cas heap_flat --test-threads=1: 14 passed, 0 failed, no SKIPPED line, also with XCL_DIRECT_DXIL=1.
  • cargo test --workspace --no-fail-fast -j 8 -- --test-threads=4, one run on head 1616c291: 2128 passed, 7 failed, 48 ignored (25 SKIPPED lines). All 7 failures also fail on main e429936c on this machine (2122 passed, 13 failed, 48 ignored): the 4 gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_* (Recompiler: LDS ds_sub_u32 hides its negation from the driver (RTX 50 refuses it) #1919 fixes them) and 3 of the 9 in main e429936 on NVIDIA: 3 e2e title tests and 6 split-wave64 GPU tests fail since #2959 #3093. Fixed against main: dispatch_chain_oversized_loop_matches_whole, dispatch_chain_wave32_live_loops, dispatch_chain_wave64_live_loops_and_exchange, gpu_heap_flat_reads_match_guarded_and_root_output, gpu_compute_mode_dispatch_abi, gpu_float_cas_uses_ieee_equality.

Regression run
scripts/smoke.ps1 -Seconds 60 -Title 9cc6a39e (Newer Retail Game), release builds of both commits in clean trees, main e429936c first, one run each, in one queue with this account's other PRs. Both runs had XCL_PREPARE=0 and the same warm DXIL cache. A warm-up run of main came before them and is not shown. A second run of main at the end of the queue showed 374 frames and a peak commit of 14157 MB, so differences of a few tens of frames between runs are noise here.

main (e429936c):

xcl-smoke v1
commit: e429936c10a5b8aa09470ff99dfc8c8d3d8c56fd
gpu: NVIDIA GeForce RTX 5070 Ti
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 382 (PresentX 382)
presents per 2 s (last 3): 13 12 12
device removals: 0
crashes: 0
peak commit: 14225 MB

This PR (1616c291):

xcl-smoke v1
commit: 1616c2912576ac890d59c2990e1d10389f118eae
gpu: NVIDIA GeForce RTX 5070 Ti
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 364 (PresentX 364)
presents per 2 s (last 3): 12 13 13
device removals: 0
crashes: 0
peak commit: 14146 MB

Not tested

  • AMD and any native wave64 GPU. DarkPanda69 reports a different message for gpu_compute_mode_dispatch_abi on an RX 9070 XT in main e429936 on NVIDIA: 3 e2e title tests and 6 split-wave64 GPU tests fail since #2959 #3093 (s_barrier in a group of several hardware waves). This PR does not change the native wave64 path of that test, so that failure is probably still there.
  • The one-window case is a judgement: I took aliasing into window 0 as the design, because the scalar expectation in the same test says so and no check exists. If a maintainer sees a missing check in the runtime instead, the third commit should be dropped.
  • No runtime file changes outside #[cfg(test)]; the smoke run is there because split.rs is a runtime file.

AI use

  • Claude Code with Claude Fable 5.2 and Anthropic subagents (Claude Opus 5.5, Claude Sonnet 5.5) helped developing.

🤖 Generated with Claude Code

The split parity fixture from 2b39525 looked for ResBind { 0, 2, 2, 1 }, but the
operands are { lower, upper, space, class }: the title memory is u2 in space 0, so
no piece ever matched and the three dispatch_chain GPU tests failed (xcl-dev#3093).
Disassembly on an RTX 5070 Ti shows { 2, 2, 0, 1 } in 2 of 4 pieces; both
assertions now hold unchanged.
dbe6b30 makes the direct path refuse real LDS access in split wave64 on purpose;
the runtime then falls back to HLSL (pso.rs, 'direct DXIL fallback'). Two GPU tests
still unwrapped the direct translation and failed on wave32 GPUs (xcl-dev#3093). They now
assert that refusal when the program is split and run the direct backend only when
it is native wave64.
With one window the direct path has no window check (Lw::windowed is mems.len() > 1),
so an outside-UMA address reads window 0. The test from 3e2a48e already expects
that for the scalar read but expected 0 for the vector one and failed on native and
split wave64 (xcl-dev#3093).
@tiagonleal

Copy link
Copy Markdown
Contributor Author

Closing as a duplicate: #3150 (KOLESNiii) fixes the same three test expectations and was merged into main while this one was still running its suite and smoke pair.

AI use: Claude Code wrote this comment (Claude Fable 5.2).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant