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

Closed
tiagonleal wants to merge 3 commits from upstream-pr/3163 into main
tiagonleal commented 2026-11-28 14:36:26 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by tiagonleal on 2026-11-28T14:36:26Z.


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 2b395256 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. dbe6b30b 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_* (#1919 fixes them) and 3 of the 9 in #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 #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

<!-- greyfinch-sync:ivall/xcl:issue:5541213799 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3163). Originally posted by [tiagonleal](https://github.com/tiagonleal) on 2026-11-28T14:36:26Z. --- 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 2b395256 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. dbe6b30b 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_*` (#1919 fixes them) and 3 of the 9 in #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 #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](https://claude.com/claude-code)
tiagonleal commented 2026-11-28 14:37:56 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by tiagonleal on 2026-11-28T14:37:56Z.


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).

<!-- greyfinch-sync:ivall/xcl:comment:7240814257 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3163#issuecomment-7240814257). Originally posted by [tiagonleal](https://github.com/tiagonleal) on 2026-11-28T14:37:56Z. --- 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).

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!3163
No description provided.