Shaders: validate and pair per-lane sweep results #1856

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

@⁠moombathepilot on GitHub · 2026-11-24 21:57 UTC · original
moombathepilot:shaders/per-lane-sweep-validation → main · +61 −21 · 2 files · 1 commits · draft

xcl shaders --direct --lanes supports the compiler measurements in #1269. When only per-lane translation succeeds, its bytes currently enter the comparison with zero bytes on the other side. Release sweeps also leave per-lane DXIL unchecked when --validate is passed. This follows up on the two sweep findings noted in #1745. Part of #1269.

What is in it

  • shaders.rs: count successful per-lane translations separately from paired DXIL sizes. Validate per-lane output under the existing sweep timeout when requested. Test the totals with a matched pair, a missing counterpart, and a validator refusal.
  • main.rs: document the comparison and validation behavior in CLI help.

Tested

  • RX 7800 XT, driver 32.0.32029.2010, Ryzen 7 5700X3D, Windows build 26300.9974, Rust 1.100.0 MSVC, DXC/DXIL 1.9.2602.17.
  • Debug scripts/test.ps1 --test-threads=4: 960 passed, 0 failed, 43 ignored. The passing total includes 8 explicit GPU skips.
    • SKIPPED gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))
    • SKIPPED gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))
    • SKIPPED gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))
    • SKIPPED gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))
    • SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))
    • SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))
    • SKIPPED shaders::tests::pso_measurement_compiles_an_exact_synthetic_record: cannot disable the driver cache (Windows Developer Mode is required): The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D)
    • SKIPPED heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows.
  • Release: xcl shaders <retail shader pack> --direct --lanes --sample 256 --seed 1 --validate --split 0 --windows 4 --threads 2 --top 0 on both commits. The candidate reported one matched pair of 18 compute programs, 6,532 B per-lane versus 6,340 B per-instruction. All 18 per-instruction translations succeeded in this sample, so the missing-counterpart case is covered by the regression test.

Regression run

Main:

xcl-smoke v1
commit: 1d027e5c76c9a86a7ee2ca1cc677edf0be95d331
gpu: AMD Radeon RX 7800 XT
title: 817b32af
seconds: 60
exit: 0x0
frames shown: 1073 (PresentX 1073)
presents per 2 s (last 3): 60 60 56
device removals: 0
crashes: 0
peak commit: 16031 MB

Candidate:

xcl-smoke v1
commit: 9b0a4c31c9ff3059f60372bf955603036709b381
gpu: AMD Radeon RX 7800 XT
title: 817b32af
seconds: 60
exit: 0x0
frames shown: 1110 (PresentX 1110)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15603 MB

Not tested

World loading, a complete retail sweep, driver compile time, other adapters, or optional XCL_SAMPLE_* tests. The retail smoke runs cover startup. This patch changes the offline comparison and validation, so these runs do not establish a runtime speedup.

AI use

Codex (GPT-6.2-sol) wrote the patch and regression test, ran the local checks, and drafted this description from their output.

**@⁠moombathepilot** on GitHub · 2026-11-24 21:57 UTC · [original](https://github.com/xcl-dev/xcl/pull/1856) `moombathepilot:shaders/per-lane-sweep-validation` → `main` · +61 −21 · 2 files · 1 commits · draft `xcl shaders --direct --lanes` supports the compiler measurements in #1269. When only per-lane translation succeeds, its bytes currently enter the comparison with zero bytes on the other side. Release sweeps also leave per-lane DXIL unchecked when `--validate` is passed. This follows up on the two sweep findings noted in #1745. Part of #1269. **What is in it** - `shaders.rs`: count successful per-lane translations separately from paired DXIL sizes. Validate per-lane output under the existing sweep timeout when requested. Test the totals with a matched pair, a missing counterpart, and a validator refusal. - `main.rs`: document the comparison and validation behavior in CLI help. **Tested** - RX 7800 XT, driver `32.0.32029.2010`, Ryzen 7 5700X3D, Windows build `26300.9974`, Rust `1.100.0` MSVC, DXC/DXIL `1.9.2602.17`. - Debug `scripts/test.ps1 --test-threads=4`: 960 passed, 0 failed, 43 ignored. The passing total includes 8 explicit GPU skips. - SKIPPED gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's)) - SKIPPED gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's)) - SKIPPED gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's)) - SKIPPED gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's)) - SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's)) - SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's)) - SKIPPED shaders::tests::pso_measurement_compiles_an_exact_synthetic_record: cannot disable the driver cache (Windows Developer Mode is required): The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D) - SKIPPED heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows. - Release: `xcl shaders <retail shader pack> --direct --lanes --sample 256 --seed 1 --validate --split 0 --windows 4 --threads 2 --top 0` on both commits. The candidate reported one matched pair of 18 compute programs, 6,532 B per-lane versus 6,340 B per-instruction. All 18 per-instruction translations succeeded in this sample, so the missing-counterpart case is covered by the regression test. **Regression run** Main: ``` xcl-smoke v1 commit: 1d027e5c76c9a86a7ee2ca1cc677edf0be95d331 gpu: AMD Radeon RX 7800 XT title: 817b32af seconds: 60 exit: 0x0 frames shown: 1073 (PresentX 1073) presents per 2 s (last 3): 60 60 56 device removals: 0 crashes: 0 peak commit: 16031 MB ``` Candidate: ``` xcl-smoke v1 commit: 9b0a4c31c9ff3059f60372bf955603036709b381 gpu: AMD Radeon RX 7800 XT title: 817b32af seconds: 60 exit: 0x0 frames shown: 1110 (PresentX 1110) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15603 MB ``` **Not tested** World loading, a complete retail sweep, driver compile time, other adapters, or optional `XCL_SAMPLE_*` tests. The retail smoke runs cover startup. This patch changes the offline comparison and validation, so these runs do not establish a runtime speedup. **AI use** Codex (GPT-6.2-sol) wrote the patch and regression test, ran the local checks, and drafted this description from their output.
Use matched outputs for DXIL size totals. Honor the validation flag on both compiler paths so rejected per-lane outputs do not count toward coverage.

Assisted-by: Codex (GPT-6.2-sol)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:07:25 +00:00
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 01:28 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 01:28 UTC · [original](https://github.com/xcl-dev/xcl/pull/1856#issuecomment-7149593484) 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!
This pull request has changes conflicting with the target branch.
  • crates/xcl/src/shaders.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

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