Tests: reduce fuzz seed 540, an RDNA2-only sext i1 -> i64 failure #2160

Merged
alexdeliu merged 1 commit from upstream-pr/2170 into main 2026-11-25 11:03:44 +00:00
alexdeliu commented 2026-11-25 07:01:58 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by alexdeliu on 2026-11-25T07:01:58Z.


fuzz_validate_and_gpu_1 fails on an RDNA2 iGPU (gfx1036) at seed 540: res[833] = 0x7, CPU 0x6. Reduced, the cause is one cast. sext i1 (trunc in[lane]) to i64 gives 0x00000000_ffffffff for a set bit on AMD's RDNA2 driver: the high dword is 0, so only the low dword gets the sign. The RX 9070 (RDNA4) and WARP give 0xffffffff_ffffffff. sext i1 -> i32 is right on all three. Seed 540 itself then computes ashr(s, 63) - (-7), which reads 7 instead of 6.

This adds seed 540's shape to amd_reduced_seeds, next to 722 and 1599 (which fail only on RDNA4). It stays #[ignore] like the rest of that test. As far as I can see, no lowering emits sext i1 -> i64 today: sext64's callers in dxil/lower*.rs pass i32 values. So this documents a driver bug for anyone who adds such a cast; it fixes nothing at run time.

What is in it

  • crates/xcl/src/gpu/dxil/fuzz_tests.rs: an s540 shape with two variants in amd_reduced_seeds, the full seed 540 in its full-seed loop, and the doc comment naming which seeds fail on which GPU.

Tested

  • One machine: AMD Radeon RX 9070 (RDNA4, 32.0.32029.2010) and the Ryzen 7 7700 iGPU (gfx1036, 32.0.21045.29003). Windows 11 Pro 26200, rustc 1.100.0 msvc, debug, Windows SDK 10.0.26100 DXC (validator 1.7).
  • cargo test -p xcl --lib gpu::dxil::fuzz_tests::amd_reduced_seeds -- --ignored --nocapture:
    • XCL_ADAPTER=1 (gfx1036): both 540 variants and full seed 540 FAIL (res[64] = 0x0, CPU 0xffffffff); every 722 / 1599 variant and both full seeds PASS.
    • RX 9070: both 540 variants and full seed 540 PASS; both 722 variants, the two 1599 -> shift / Bfrev variants and both full seeds FAIL, as on main.
    • WARP: skipped (no wave32 GPU).
  • cargo test --workspace -- --test-threads=4 on this branch, RX 9070: 1152 passed, 2 failed, 46 ignored, 90 SKIPPED (81 of them because validator 1.7 < 1.8), the same as main. The 2 failures are fuzz_validate_and_gpu_1 / _3 (seeds 722 / 1599, RDNA4), as on main.

Not tested

  • (Rerun after the rebase: cargo test --workspace -- --test-threads=4 at this head on main 568e7db, RX 9070: 1152 passed, 2 failed (seeds 722 / 1599, as on main), 46 ignored, 90 SKIPPED.)
  • NVIDIA and Intel. Other RDNA2 parts (only the gfx1036 iGPU, one driver).
  • No retail title. The change is test-only.

AI use

  • Claude Code with Claude Opus 5.5 wrote the code, the tests and this description, and ran the tests above. The contributor opened it after reading the summary of the findings.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:6599109121 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2170). Originally posted by [alexdeliu](https://github.com/alexdeliu) on 2026-11-25T07:01:58Z. --- `fuzz_validate_and_gpu_1` fails on an RDNA2 iGPU (gfx1036) at seed 540: `res[833] = 0x7, CPU 0x6`. Reduced, the cause is one cast. `sext i1 (trunc in[lane]) to i64` gives `0x00000000_ffffffff` for a set bit on AMD's RDNA2 driver: the high dword is 0, so only the low dword gets the sign. The RX 9070 (RDNA4) and WARP give `0xffffffff_ffffffff`. `sext i1 -> i32` is right on all three. Seed 540 itself then computes `ashr(s, 63) - (-7)`, which reads 7 instead of 6. This adds seed 540's shape to `amd_reduced_seeds`, next to 722 and 1599 (which fail only on RDNA4). It stays `#[ignore]` like the rest of that test. As far as I can see, no lowering emits `sext i1 -> i64` today: `sext64`'s callers in `dxil/lower*.rs` pass i32 values. So this documents a driver bug for anyone who adds such a cast; it fixes nothing at run time. **What is in it** - `crates/xcl/src/gpu/dxil/fuzz_tests.rs`: an `s540` shape with two variants in `amd_reduced_seeds`, the full seed 540 in its full-seed loop, and the doc comment naming which seeds fail on which GPU. **Tested** - One machine: AMD Radeon RX 9070 (RDNA4, 32.0.32029.2010) and the Ryzen 7 7700 iGPU (gfx1036, 32.0.21045.29003). Windows 11 Pro 26200, rustc 1.100.0 msvc, debug, Windows SDK 10.0.26100 DXC (validator 1.7). - `cargo test -p xcl --lib gpu::dxil::fuzz_tests::amd_reduced_seeds -- --ignored --nocapture`: - `XCL_ADAPTER=1` (gfx1036): both 540 variants and full seed 540 FAIL (`res[64] = 0x0, CPU 0xffffffff`); every 722 / 1599 variant and both full seeds PASS. - RX 9070: both 540 variants and full seed 540 PASS; both 722 variants, the two 1599 `-> shift / Bfrev` variants and both full seeds FAIL, as on `main`. - WARP: skipped (no wave32 GPU). - `cargo test --workspace -- --test-threads=4` on this branch, RX 9070: 1152 passed, 2 failed, 46 ignored, 90 SKIPPED (81 of them because validator 1.7 < 1.8), the same as `main`. The 2 failures are `fuzz_validate_and_gpu_1` / `_3` (seeds 722 / 1599, RDNA4), as on `main`. **Not tested** - (Rerun after the rebase: `cargo test --workspace -- --test-threads=4` at this head on `main` 568e7db, RX 9070: 1152 passed, 2 failed (seeds 722 / 1599, as on `main`), 46 ignored, 90 SKIPPED.) - NVIDIA and Intel. Other RDNA2 parts (only the gfx1036 iGPU, one driver). - No retail title. The change is test-only. **AI use** - Claude Code with Claude Opus 5.5 wrote the code, the tests and this description, and ran the tests above. The contributor opened it after reading the summary of the findings. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
luckyteagirl commented 2026-11-25 08:08:13 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-25T07:25:21Z.


Independent RX 6800M run of the ignored reduced-seed test on exact PR head 2fe270de82b9bef9d883eb1a196b91bb82b601d5, plus a separate diagnostic control with the existing #1974 fix applied.

Tested

  • Windows 11 build 26200; Ryzen 9 5980HX; Radeon RX 6800M (RDNA2) driver 30.0.13002.13003; Rust 1.99.0 MSVC; DXC/DXIL 1.9.2609.5. XCL_ADAPTER=6800M, XCL_DIRECT_DXIL=1.
  • On the clean #2170 head, cargo test --locked -p xcl --lib -j 2 amd_reduced_seeds -- --ignored --test-threads=1 --show-output exited 101 (0 passed, 1 failed). Both new reduced 540 variants failed: bare sext i1 -> i64 at res[64] = 0x0 vs CPU 0xffffffff, and the shift/subtract form at res[0] = 0x7 vs CPU 0x6. All five 722/1599 reduced variants passed. The subsequent full seed 540 did not yield a value comparison: CreateComputePipelineState returned device suspension 0x887A0005.
  • Diagnostic control: on a separate #2170 worktree, I cherry-picked #1974 commit 848ac65b9a2061c01f4fc7574ab3a156fce5abc6 without committing. It changes only dxil/module.rs and adds its ops_tests.rs test. The same ignored command then reported PASS for both reduced 540 variants and the same five 722/1599 variants. The aggregate still exited 101 because full seed 540 again hit device suspension 0x887A0005; it is not a full-seed pass.

This extends the reported reduced 540 behavior from a gfx1036 iGPU to an RX 6800M dGPU on this older driver and directly checks that the existing i1 sign-extension fix in #1974 clears the reduced cases. I did not run a full workspace suite or retail title for this test-only PR. The full seed's device-suspension cause remains unresolved by this comparison.

AI-assisted checkout, testing, result comparison, and report drafting with OpenAI Codex (GPT-6). No game data was used.

<!-- greyfinch-sync:ivall/xcl:comment:7155841888 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2170#issuecomment-7155841888). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-25T07:25:21Z. --- Independent RX 6800M run of the ignored reduced-seed test on exact PR head `2fe270de82b9bef9d883eb1a196b91bb82b601d5`, plus a separate diagnostic control with the existing #1974 fix applied. **Tested** - Windows 11 build 26200; Ryzen 9 5980HX; Radeon RX 6800M (RDNA2) driver `30.0.13002.13003`; Rust 1.99.0 MSVC; DXC/DXIL 1.9.2609.5. `XCL_ADAPTER=6800M`, `XCL_DIRECT_DXIL=1`. - On the clean #2170 head, `cargo test --locked -p xcl --lib -j 2 amd_reduced_seeds -- --ignored --test-threads=1 --show-output` exited 101 (**0 passed, 1 failed**). Both new reduced 540 variants failed: bare `sext i1 -> i64` at `res[64] = 0x0` vs CPU `0xffffffff`, and the shift/subtract form at `res[0] = 0x7` vs CPU `0x6`. All five 722/1599 reduced variants passed. The subsequent full seed 540 did not yield a value comparison: `CreateComputePipelineState` returned device suspension `0x887A0005`. - Diagnostic control: on a separate #2170 worktree, I cherry-picked #1974 commit `848ac65b9a2061c01f4fc7574ab3a156fce5abc6` without committing. It changes only `dxil/module.rs` and adds its `ops_tests.rs` test. The same ignored command then reported **PASS for both reduced 540 variants** and the same five 722/1599 variants. The aggregate still exited 101 because full seed 540 again hit device suspension `0x887A0005`; it is not a full-seed pass. This extends the reported reduced 540 behavior from a gfx1036 iGPU to an RX 6800M dGPU on this older driver and directly checks that the existing [i1 sign-extension fix in #1974](https://github.com/xcl-dev/xcl/pull/1974) clears the reduced cases. I did not run a full workspace suite or retail title for this test-only PR. The full seed's device-suspension cause remains unresolved by this comparison. AI-assisted checkout, testing, result comparison, and report drafting with OpenAI Codex (GPT-6). No game data was used.
DavidM1911 commented 2026-11-25 08:08:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T07:28:03Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7155891982 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2170#issuecomment-7155891982). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T07:28:03Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
upstream-sync closed this pull request 2026-11-25 11:08:31 +00:00
alexdeliu commented 2026-11-25 11:09:19 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by alexdeliu on 2026-11-25T10:44:50Z.


Related: #1974 (Direct DXIL: sign-extend i1 to i64 through i32) is the fix for this case. With #1974 applied, both 540 variants and full seed 540 pass on the gfx1036, as they did on @luckyteagirl's RX 6800M. So this PR is the GPU regression test for #1974; results are on that PR. If #1974 lands first, amd_reduced_seeds stays green on RDNA2 for seed 540.

<!-- greyfinch-sync:ivall/xcl:comment:7160116790 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2170#issuecomment-7160116790). Originally posted by [alexdeliu](https://github.com/alexdeliu) on 2026-11-25T10:44:50Z. --- Related: #1974 (`Direct DXIL: sign-extend i1 to i64 through i32`) is the fix for this case. With #1974 applied, both 540 variants and full seed 540 pass on the gfx1036, as they did on @luckyteagirl's RX 6800M. So this PR is the GPU regression test for #1974; results are on that PR. If #1974 lands first, `amd_reduced_seeds` stays green on RDNA2 for seed 540.
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!2160
No description provided.