Tests: three split-wave64 / direct-DXIL test expectations that fail on main (#3093) #3150

Merged
KOLESNiii merged 3 commits from upstream-pr/3150 into main 2026-11-28 14:06:40 +00:00
KOLESNiii commented 2026-11-28 13:02:08 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-28T13:02:08Z.


Tests: the split-piece binding check looks for title memory's own ResBind
2b395256 ("prune unused split-piece resource bindings") checks that some pieces of the split
parity fixture keep the title-memory binding and the scratch-only ones drop it, by looking for
ResBind { i32 0, i32 2, i32 2, i8 1 } in each piece's disassembly. DXIL's ResBind is
{ lower, upper, space, class }: title memory (u2, space 0) is ResBind { i32 2, i32 2, i32 0, i8 1 },
and the string looked for is in no piece, so the first assertion fails on every GPU that runs the
fixture (dispatch_chain_wave32_live_loops, dispatch_chain_wave64_live_loops_and_exchange,
dispatch_chain_oversized_loop_matches_whole; #3093). The pruning itself works: with the binding
printed, pieces 0 and 3 of the wave32 fixture have it and pieces 1 and 2 do not.

Part of #3093.

Tests: one root UAV wraps an outside address in the heap flat-read test
gpu_heap_flat_reads_match_guarded_and_root_output (3e2a48ec) runs a one-window case as the
root-UAV-only baseline. A root UAV has no window index to check, so an address outside the arena
wraps into its window: the test expects that for the scalar load (0xA000) and for the end-of-view
dwordx2, but expected 0 for the vector load of the outside lanes (lane % 8 == 7). The GPU returns
the wrapped value, (0 + 1) * 1000 + lane (lane 39: 1039; #3093, on NVIDIA and AMD). The null lanes
and the heap-window cases still expect 0.

Part of #3093.

Tests: direct-DXIL comparisons take the HLSL path where the runtime does
2ca91276 and dbe6b30b make the direct-DXIL translators refuse two forms the runtime then builds
through HLSL: an s_barrier in a group of several hardware waves, and split wave64 with real LDS
accesses. direct_or took the HLSL form for the first only, and gpu_compute_mode_dispatch_abi and
gpu_float_cas_uses_ieee_equality translated direct DXIL themselves and panicked on either refusal
(#3093: the barrier one on a native-wave64 RX 9070 XT, the split LDS one on wave32 NVIDIA).

routed_to_hlsl names both refusals; direct_or and the two tests use the HLSL form for them, and
skip only the direct backend's comparison there. Any other direct-DXIL error still fails the test,
and the refusals themselves keep their own tests (robustness_tests, lower_dxil).

Part of #3093.

What is in it

  • crates/xcl/src/gpu/dxil/module/split.rs: +1 / -1
  • crates/xcl/src/gpu/recomp/heap_window_tests.rs: +5 / -1
  • crates/xcl/src/gpu/recomp/tests.rs: +35 / -13

Tested

  • NVIDIA RTX 2070 SUPER (driver 32.0.16.2140), AMD Ryzen 5 3600XT, Windows 11 build 26300, Rust 1.100.0 MSVC; tests in debug
  • The six tests of the issue, cargo test -p xcl --lib -- <the six names> --test-threads=1, on this head: 5 passed, 1 failed (on main 336fddda: 0 passed, 6 failed). The five now passing: dispatch_chain_wave32_live_loops, dispatch_chain_wave64_live_loops_and_exchange, dispatch_chain_oversized_loop_matches_whole, gpu_heap_flat_reads_match_guarded_and_root_output, gpu_float_cas_uses_ieee_equality.
  • The split-piece binding check was confirmed without the GPU: the disassembly of the wave32 fixture's pieces has ResBind { i32 2, i32 2, i32 0, i8 1 } in pieces 0 and 3 and not in 1 and 2.

Regression run
Not run yet. scripts/smoke.ps1 on main and on this head, from the same warm cache, will be run; two earlier attempts were stopped by the harness (low memory) before they started. The two xcl-smoke blocks will be added here when they exist.

Not tested

  • gpu_compute_mode_dispatch_abi still fails, and it is not a test error: on the HLSL path with a split wave64 on a wave32 GPU, a group that is only partly live in X (an X limit between 17 and 31 of a 16-wide group) writes nothing, while a partly live Y or a fully dead group behave. Probe of limits (x, y) on a 2 x 3 grid of 16 x 8 groups: no limit, all 128 threads of every group write; (16..31, 0): groups with x = 1 write 0; (32, 0): all write; (0, 17): the y = 2 groups write 16 (correct). It comes from the DispatchX thread-limit masking of d9403543 through xcl_x_ballot; not fixed here.
  • The whole suite on this head, and AMD (the direct-DXIL refusals are the same on native wave64, where the HLSL backend was not reached before this change).
  • AMD and Intel GPUs; wave64 hardware (the RTX 2070 SUPER is wave32).

AI use

  • Claude Code, Claude Opus 5.5 (the diagnosis and the fixes): the code and tests. The description and the test / suite runs: Claude Code, Claude Sonnet 5.5 and Claude Opus 5.5.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5540381293 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3150). Originally posted by [KOLESNiii](https://github.com/KOLESNiii) on 2026-11-28T13:02:08Z. --- **Tests: the split-piece binding check looks for title memory's own ResBind** 2b395256 ("prune unused split-piece resource bindings") checks that some pieces of the split parity fixture keep the title-memory binding and the scratch-only ones drop it, by looking for `ResBind { i32 0, i32 2, i32 2, i8 1 }` in each piece's disassembly. DXIL's ResBind is { lower, upper, space, class }: title memory (u2, space 0) is `ResBind { i32 2, i32 2, i32 0, i8 1 }`, and the string looked for is in no piece, so the first assertion fails on every GPU that runs the fixture (dispatch_chain_wave32_live_loops, dispatch_chain_wave64_live_loops_and_exchange, dispatch_chain_oversized_loop_matches_whole; #3093). The pruning itself works: with the binding printed, pieces 0 and 3 of the wave32 fixture have it and pieces 1 and 2 do not. Part of #3093. **Tests: one root UAV wraps an outside address in the heap flat-read test** gpu_heap_flat_reads_match_guarded_and_root_output (3e2a48ec) runs a one-window case as the root-UAV-only baseline. A root UAV has no window index to check, so an address outside the arena wraps into its window: the test expects that for the scalar load (0xA000) and for the end-of-view dwordx2, but expected 0 for the vector load of the outside lanes (lane % 8 == 7). The GPU returns the wrapped value, (0 + 1) * 1000 + lane (lane 39: 1039; #3093, on NVIDIA and AMD). The null lanes and the heap-window cases still expect 0. Part of #3093. **Tests: direct-DXIL comparisons take the HLSL path where the runtime does** 2ca91276 and dbe6b30b make the direct-DXIL translators refuse two forms the runtime then builds through HLSL: an s_barrier in a group of several hardware waves, and split wave64 with real LDS accesses. direct_or took the HLSL form for the first only, and gpu_compute_mode_dispatch_abi and gpu_float_cas_uses_ieee_equality translated direct DXIL themselves and panicked on either refusal (#3093: the barrier one on a native-wave64 RX 9070 XT, the split LDS one on wave32 NVIDIA). routed_to_hlsl names both refusals; direct_or and the two tests use the HLSL form for them, and skip only the direct backend's comparison there. Any other direct-DXIL error still fails the test, and the refusals themselves keep their own tests (robustness_tests, lower_dxil). Part of #3093. **What is in it** - `crates/xcl/src/gpu/dxil/module/split.rs`: +1 / -1 - `crates/xcl/src/gpu/recomp/heap_window_tests.rs`: +5 / -1 - `crates/xcl/src/gpu/recomp/tests.rs`: +35 / -13 **Tested** - NVIDIA RTX 2070 SUPER (driver 32.0.16.2140), AMD Ryzen 5 3600XT, Windows 11 build 26300, Rust 1.100.0 MSVC; tests in debug - The six tests of the issue, `cargo test -p xcl --lib -- <the six names> --test-threads=1`, on this head: 5 passed, 1 failed (on `main` `336fddda`: 0 passed, 6 failed). The five now passing: `dispatch_chain_wave32_live_loops`, `dispatch_chain_wave64_live_loops_and_exchange`, `dispatch_chain_oversized_loop_matches_whole`, `gpu_heap_flat_reads_match_guarded_and_root_output`, `gpu_float_cas_uses_ieee_equality`. - The split-piece binding check was confirmed without the GPU: the disassembly of the wave32 fixture's pieces has `ResBind { i32 2, i32 2, i32 0, i8 1 }` in pieces 0 and 3 and not in 1 and 2. **Regression run** Not run yet. `scripts/smoke.ps1` on `main` and on this head, from the same warm cache, will be run; two earlier attempts were stopped by the harness (low memory) before they started. The two `xcl-smoke` blocks will be added here when they exist. **Not tested** - `gpu_compute_mode_dispatch_abi` still fails, and it is not a test error: on the HLSL path with a split wave64 on a wave32 GPU, a group that is only partly live in X (an X limit between 17 and 31 of a 16-wide group) writes nothing, while a partly live Y or a fully dead group behave. Probe of limits (x, y) on a 2 x 3 grid of 16 x 8 groups: no limit, all 128 threads of every group write; (16..31, 0): groups with x = 1 write 0; (32, 0): all write; (0, 17): the y = 2 groups write 16 (correct). It comes from the DispatchX thread-limit masking of `d9403543` through `xcl_x_ballot`; not fixed here. - The whole suite on this head, and AMD (the direct-DXIL refusals are the same on native wave64, where the HLSL backend was not reached before this change). - AMD and Intel GPUs; wave64 hardware (the RTX 2070 SUPER is wave32). **AI use** - Claude Code, Claude Opus 5.5 (the diagnosis and the fixes): the code and tests. The description and the test / suite runs: Claude Code, Claude Sonnet 5.5 and Claude Opus 5.5. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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!3150
No description provided.