Tests: report failures when replaying a single DXIL fuzz seed #2124

Open
github-bot wants to merge 1 commit from github-bot/gh-2124 into main AGit
Owner

@⁠mokkamokacaffe on GitHub · 2026-11-25 05:24 UTC · original
mokkamokacaffe:tests/dxil-debug-seed-verdict → main · +22 −18 · 1 files · 1 commits · draft

Part of #2115. Replaying a failing seed with the existing ignored debug_seed test can print a validator error, a driver error, or a count of mismatches and still exit successfully. Make a single-seed run return the same failure as the batch when it reaches that check.

What is in it

  • In crates/xcl/src/gpu/dxil/fuzz_tests.rs, reuse the batch's validator and GPU comparison in the single-seed diagnostic. Both paths identify the first mismatching output index and the GPU and CPU values. The diagnostic still prints the disassembly and honors FUZZ_WATCH. Validation-only seeds and unavailable wave32 hardware get a skip message.
  • To replay on Windows PowerShell, set $env:FUZZ_SEED='722' and run cargo test -p xcl --lib gpu::dxil::fuzz_tests::debug_seed -- --exact --ignored --nocapture.

Tested

  • git diff --check passed. Checked the shared comparison against the original batch loop, including its result indexing and dispatch arguments.
  • Linux CPU-only control-flow check using the edited diagnostic functions and stub validator/runner responses: matching output and capability skip exited 0, and validator rejection, driver error and mismatching output each exited 101 with the expected message (5 cases).

Regression run

Test harness only.

Not tested

  • Windows build, workspace tests and GPU results for seed 722. Cross-checking the Windows MSVC target from Linux stopped in the native dependency build because lib.exe is unavailable. The AMD compiler issue remains open.

AI use

  • OpenAI Codex (GPT-6.2 Astra) traced the batch and diagnostic paths, edited the test harness, attempted the cross-check and drafted the description.
**@⁠mokkamokacaffe** on GitHub · 2026-11-25 05:24 UTC · [original](https://github.com/xcl-dev/xcl/pull/2124) `mokkamokacaffe:tests/dxil-debug-seed-verdict` → `main` · +22 −18 · 1 files · 1 commits · draft Part of #2115. Replaying a failing seed with the existing ignored `debug_seed` test can print a validator error, a driver error, or a count of mismatches and still exit successfully. Make a single-seed run return the same failure as the batch when it reaches that check. **What is in it** - In `crates/xcl/src/gpu/dxil/fuzz_tests.rs`, reuse the batch's validator and GPU comparison in the single-seed diagnostic. Both paths identify the first mismatching output index and the GPU and CPU values. The diagnostic still prints the disassembly and honors `FUZZ_WATCH`. Validation-only seeds and unavailable wave32 hardware get a skip message. - To replay on Windows PowerShell, set `$env:FUZZ_SEED='722'` and run `cargo test -p xcl --lib gpu::dxil::fuzz_tests::debug_seed -- --exact --ignored --nocapture`. **Tested** - `git diff --check` passed. Checked the shared comparison against the original batch loop, including its result indexing and dispatch arguments. - Linux CPU-only control-flow check using the edited diagnostic functions and stub validator/runner responses: matching output and capability skip exited 0, and validator rejection, driver error and mismatching output each exited 101 with the expected message (5 cases). **Regression run** Test harness only. **Not tested** - Windows build, workspace tests and GPU results for seed 722. Cross-checking the Windows MSVC target from Linux stopped in the native dependency build because `lib.exe` is unavailable. The AMD compiler issue remains open. **AI use** - OpenAI Codex (GPT-6.2 Astra) traced the batch and diagnostic paths, edited the test harness, attempted the cross-check and drafted the description.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:19:49 +00:00
Author
Owner

@⁠luckyteagirl on GitHub · 2026-11-25 05:31 UTC · original

Windows/RX 6800M verification on exact head ced97c2af0c5cca480b4aa926681896cfa9cf3b9 (clean detached worktree). Main control was f5c5bdf0e91035f8f1404f46f4f2f7aedc259e7f.

Tested: Windows 11 build 26200, Ryzen 9 5980HX, AMD Radeon RX 6800M (RDNA2), driver 30.0.13002.13003, Rust 1.99.0 MSVC, DXC/DXIL 1.9.2609.5. Debug test profile, XCL_ADAPTER=6800M, XCL_REQUIRE_GPU=1, XCL_DIRECT_DXIL=0. For each seed I set FUZZ_SEED and ran cargo test --locked -p xcl --lib -j 2 gpu::dxil::fuzz_tests::debug_seed -- --exact --ignored --test-threads=1 --show-output.

Seed Main PR head
530, GPU-safe Printed CreateComputePipelineState device suspension 0x887A0005 but exited 0 (1 passed) Printed the same error and exited 101 (1 failed)
503, GPU-safe Not run Exited 0 (1 passed, no skip)
500, validation-only Not run Exited 0 with SKIPPED ... seed is validation-only

This verifies the new diagnostic propagates a real Windows GPU pipeline failure while a GPU-safe success still passes. It does not explain the driver suspension or verify the seed 722 result mismatch from issue #2115. I did not run the full workspace suite, other adapters, or a retail title.

AI use: OpenAI Codex (GPT-6, exact variant not exposed in this session) built the PR head, ran and compared the seed probes, reviewed the diff, and drafted this report.

**@⁠luckyteagirl** on GitHub · 2026-11-25 05:31 UTC · [original](https://github.com/xcl-dev/xcl/pull/2124#issuecomment-7153850302) **Windows/RX 6800M verification on exact head** `ced97c2af0c5cca480b4aa926681896cfa9cf3b9` (clean detached worktree). Main control was `f5c5bdf0e91035f8f1404f46f4f2f7aedc259e7f`. **Tested:** Windows 11 build 26200, Ryzen 9 5980HX, AMD Radeon RX 6800M (RDNA2), driver `30.0.13002.13003`, Rust 1.99.0 MSVC, DXC/DXIL 1.9.2609.5. Debug test profile, `XCL_ADAPTER=6800M`, `XCL_REQUIRE_GPU=1`, `XCL_DIRECT_DXIL=0`. For each seed I set `FUZZ_SEED` and ran `cargo test --locked -p xcl --lib -j 2 gpu::dxil::fuzz_tests::debug_seed -- --exact --ignored --test-threads=1 --show-output`. | Seed | Main | PR head | | --- | --- | --- | | 530, GPU-safe | Printed `CreateComputePipelineState` device suspension `0x887A0005` but **exited 0** (1 passed) | Printed the same error and **exited 101** (1 failed) | | 503, GPU-safe | Not run | **Exited 0** (1 passed, no skip) | | 500, validation-only | Not run | **Exited 0** with `SKIPPED ... seed is validation-only` | This verifies the new diagnostic propagates a real Windows GPU pipeline failure while a GPU-safe success still passes. It does not explain the driver suspension or verify the seed 722 result mismatch from issue #2115. I did not run the full workspace suite, other adapters, or a retail title. **AI use:** OpenAI Codex (GPT-6, exact variant not exposed in this session) built the PR head, ran and compared the seed probes, reviewed the diff, and drafted this report.
Author
Owner

@⁠upipibi on GitHub · 2026-11-25 05:36 UTC · original

Checked on an RTX 3070 (Ampere, driver 616.56), Windows 11, debug, at ced97c2, with seeds whose outcome on this card is known:

  • FUZZ_SEED=56927 (wrong results on NVIDIA): debug_seed now fails (exit 101).
  • FUZZ_SEED=6286 (the driver refuses the pipeline: CreateComputePipelineState returns E_OUTOFMEMORY): fails and reports the driver error.
  • FUZZ_SEED=1599 (clean): passes.
  • cargo test -p xcl --lib -- fuzz_: 5 passed, 2 ignored.

Both failing seeds are NVIDIA driver issues, not translator bugs. 56927 is an i64 multiply of a zero-extended 0x80000000 by a sign-extended value, with the wrong sign. 6286 is an i32 urem by a constant ≥ 2^31 of a WaveReadLaneFirst value inside a loop, which the driver refuses to compile. Neither form comes out of XCL's translators.

AI-assisted (Claude Code). Synthetic tests only.

**@⁠upipibi** on GitHub · 2026-11-25 05:36 UTC · [original](https://github.com/xcl-dev/xcl/pull/2124#issuecomment-7153959553) Checked on an RTX 3070 (Ampere, driver 616.56), Windows 11, debug, at `ced97c2`, with seeds whose outcome on this card is known: - `FUZZ_SEED=56927` (wrong results on NVIDIA): `debug_seed` now **fails** (exit 101). - `FUZZ_SEED=6286` (the driver refuses the pipeline: `CreateComputePipelineState` returns `E_OUTOFMEMORY`): **fails** and reports the driver error. - `FUZZ_SEED=1599` (clean): passes. - `cargo test -p xcl --lib -- fuzz_`: 5 passed, 2 ignored. Both failing seeds are NVIDIA driver issues, not translator bugs. 56927 is an i64 multiply of a zero-extended `0x80000000` by a sign-extended value, with the wrong sign. 6286 is an i32 `urem` by a constant ≥ 2^31 of a `WaveReadLaneFirst` value inside a loop, which the driver refuses to compile. Neither form comes out of XCL's translators. AI-assisted (Claude Code). Synthetic tests only.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 06:17 UTC · original

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!

**@⁠DavidM1911** on GitHub · 2026-11-25 06:17 UTC · [original](https://github.com/xcl-dev/xcl/pull/2124#issuecomment-7154644988) 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!
Author
Owner

@⁠ettehn on GitHub · 2026-11-25 09:24 UTC · original

One remaining diagnostic edge on ced97c2: debug_seed unwraps disassembly before check_valid. If the emitter produces a container that both reject, the replay exits with a generic unwrap panic and no seed, while the batch names the seed and validator error. A local test using an empty container (rejected by XCL’s length check before DXC) reproduced that discrepancy. Moving check_valid ahead of disassembly made it pass with seed 314: validator rejected the module. A disassembly-only error can also include the seed.

Native Windows with WARP: seed 722 still prints FUZZ_WATCH=30 with CPU 0x7fffffff and explicitly skips no wave32. Seed 500 reports seed is validation-only. With XCL_REQUIRE_GPU=wave64, the missing wave32 result on seed 722 exits 101, as directed by the existing strict skip policy. No hardware adapter was exercised.

AI use — OpenAI Codex (GPT-6) ran the checks and wrote the local diagnostic patch.

**@⁠ettehn** on GitHub · 2026-11-25 09:24 UTC · [original](https://github.com/xcl-dev/xcl/pull/2124#issuecomment-7158278991) One remaining diagnostic edge on `ced97c2`: `debug_seed` unwraps disassembly before `check_valid`. If the emitter produces a container that both reject, the replay exits with a generic unwrap panic and no seed, while the batch names the seed and validator error. A local test using an empty container (rejected by XCL’s length check before DXC) reproduced that discrepancy. Moving `check_valid` ahead of disassembly made it pass with `seed 314: validator rejected the module`. A disassembly-only error can also include the seed. Native Windows with WARP: seed 722 still prints `FUZZ_WATCH=30` with CPU `0x7fffffff` and explicitly skips `no wave32`. Seed 500 reports `seed is validation-only`. With `XCL_REQUIRE_GPU=wave64`, the missing wave32 result on seed 722 exits 101, as directed by the existing strict skip policy. No hardware adapter was exercised. AI use — OpenAI Codex (GPT-6) ran the checks and wrote the local diagnostic patch.
Author
Owner

@⁠Lum7nt on GitHub · 2026-11-25 12:47 UTC · original

Windows hardware check on clean head ced97c2af0c5cca480b4aa926681896cfa9cf3b9: Radeon RX 9070 XT, driver 32.0.32029.2010, DXC 1.9.2609.5. For each seed I set FUZZ_SEED and ran:

cargo test --offline --locked --release -p xcl --lib gpu::dxil::fuzz_tests::debug_seed -- --exact --ignored --nocapture --test-threads=1

  • Seed 0: 1 passed, 0 failed, 0 ignored, exit 0.
  • Seed 722: 0 passed, 1 failed, 0 ignored, exit 101; mismatch at result 30 (GPU 1, CPU 0x7fffffff).
  • Seed 1599: 0 passed, 1 failed, 0 ignored, exit 101; mismatch at result 193 (GPU 1, CPU 0).

These are synthetic diagnostic runs, not a full workspace or retail test. The corresponding batch failures also reproduced on the tested main control; this report does not establish their cause.

AI use: OpenAI Codex (GPT-6; exact variant unavailable) ran the checks and drafted this report.

**@⁠Lum7nt** on GitHub · 2026-11-25 12:47 UTC · [original](https://github.com/xcl-dev/xcl/pull/2124#issuecomment-7162864588) Windows hardware check on clean head `ced97c2af0c5cca480b4aa926681896cfa9cf3b9`: Radeon RX 9070 XT, driver `32.0.32029.2010`, DXC 1.9.2609.5. For each seed I set `FUZZ_SEED` and ran: `cargo test --offline --locked --release -p xcl --lib gpu::dxil::fuzz_tests::debug_seed -- --exact --ignored --nocapture --test-threads=1` - Seed 0: 1 passed, 0 failed, 0 ignored, exit 0. - Seed 722: 0 passed, 1 failed, 0 ignored, exit 101; mismatch at result 30 (GPU 1, CPU `0x7fffffff`). - Seed 1599: 0 passed, 1 failed, 0 ignored, exit 101; mismatch at result 193 (GPU 1, CPU 0). These are synthetic diagnostic runs, not a full workspace or retail test. The corresponding batch failures also reproduced on the tested main control; this report does not establish their cause. AI use: OpenAI Codex (GPT-6; exact variant unavailable) ran the checks and drafted this report.
Author
Owner

@⁠anes66 on GitHub · 2026-11-25 15:29 UTC · original

Native Windows CPU-only verification of exact head ced97c2af0c5cca480b4aa926681896cfa9cf3b9 passed, using optional test-only companion 0a5cdfb. It adds XCL_FUZZ_CPU_ONLY=1 to avoid capability queries as well as dispatch, including single-seed diagnostics. The normal GPU path remains selected when unset.

Tested

  • Windows 10 Pro 19045, Ryzen 7 9800X3D, Rust 1.100.0 MSVC, debug, SDK DXC/DXIL 1.9.2602.17. No GPU device or title execution.
  • XCL_FUZZ_CPU_ONLY=1 cargo test --locked -p xcl --lib gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_ -j 2 -- --nocapture --test-threads=1: 4 passed / 0 failed / 0 ignored; 2,000 validated, 0 GPU-compared. The same corpus also passed on the combined local optimizer tree based on main 06c9f55 (another 4/0/0, 0 GPU comparisons).
  • FUZZ_SEED=722, FUZZ_WATCH=0, CPU-only mode, debug_seed --exact --ignored --nocapture: 1 passed / 0 failed, with one explicit GPU-comparison skip. Disassembly and the CPU watch output were produced.
  • Native error-path control: toggle the synthetic container's Int64Ops feature bit and recompute its digest. The real SDK validator rejects it with Container part 'Feature Info' does not match expected for module; this PR's diagnostic exits 101. Restoring only the old print-the-Result behavior on the same invalid container exits 0, demonstrating the false success the PR fixes. All temporary mutations were removed before the final passing runs and commit.

Not tested
GPU comparison/error/mismatch paths, AMD seed 722 execution, full workspace or a title. The two 2,000-seed results are validator coverage, not shader-output parity.

**@⁠anes66** on GitHub · 2026-11-25 15:29 UTC · [original](https://github.com/xcl-dev/xcl/pull/2124#issuecomment-7166916132) Native Windows CPU-only verification of exact head `ced97c2af0c5cca480b4aa926681896cfa9cf3b9` passed, using optional test-only companion [0a5cdfb](https://github.com/anes66/xcl/commit/0a5cdfbfd360c45b4fcd49a1535ae5358137379f). It adds `XCL_FUZZ_CPU_ONLY=1` to avoid capability queries as well as dispatch, including single-seed diagnostics. The normal GPU path remains selected when unset. **Tested** - Windows 10 Pro 19045, Ryzen 7 9800X3D, Rust 1.100.0 MSVC, debug, SDK DXC/DXIL 1.9.2602.17. No GPU device or title execution. - `XCL_FUZZ_CPU_ONLY=1 cargo test --locked -p xcl --lib gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_ -j 2 -- --nocapture --test-threads=1`: **4 passed / 0 failed / 0 ignored**; **2,000 validated, 0 GPU-compared**. The same corpus also passed on the combined local optimizer tree based on main `06c9f55` (another 4/0/0, 0 GPU comparisons). - `FUZZ_SEED=722`, `FUZZ_WATCH=0`, CPU-only mode, `debug_seed --exact --ignored --nocapture`: **1 passed / 0 failed**, with **one explicit GPU-comparison skip**. Disassembly and the CPU watch output were produced. - Native error-path control: toggle the synthetic container's Int64Ops feature bit and recompute its digest. The real SDK validator rejects it with `Container part 'Feature Info' does not match expected for module`; this PR's diagnostic exits **101**. Restoring only the old print-the-Result behavior on the same invalid container exits **0**, demonstrating the false success the PR fixes. All temporary mutations were removed before the final passing runs and commit. **Not tested** GPU comparison/error/mismatch paths, AMD seed 722 execution, full workspace or a title. The two 2,000-seed results are validator coverage, not shader-output parity.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2124/head:github-bot/gh-2124'
git switch 'github-bot/gh-2124'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2124'
git switch 'github-bot/gh-2124'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2124'
git switch 'github-bot/gh-2124'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2124'
git switch 'main'
git merge --squash 'github-bot/gh-2124'
git switch 'main'
git merge --ff-only 'github-bot/gh-2124'
git switch 'main'
git merge 'github-bot/gh-2124'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.