Skip to content

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

Open
moombathepilot wants to merge 1 commit into
xcl-dev:mainfrom
moombathepilot:shaders/per-lane-sweep-validation
Open

moombathepilot wants to merge 1 commit into
xcl-dev:mainfrom
moombathepilot:shaders/per-lane-sweep-validation

Conversation

@moombathepilot

@moombathepilot moombathepilot commented Nov 24, 2026 •

Copy link
Copy Markdown

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 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. The regression test covers 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.
  • Current PR head 879dce5d3c35c900a51a71dd937532be8ca7e98a, rebased onto main 10d272970f25b02b72ebe3c883d02d74d4d4763b: cargo build --release -p xcl --bin xcl passed; git diff origin/main...HEAD --check passed.
  • Focused per_lane_sweep_totals_include_only_matched_outputs: 1 passed, 0 failed. cargo test -p xcl --lib shaders::tests -- --test-threads=4: 21 passed, 0 failed, 0 ignored. One test printed SKIPPED internally because disabling the driver cache requires Windows Developer Mode here; it still returned ok.
  • cargo test --workspace -- --test-threads=4 stopped in the xcl library: 2015 passed, 3 failed, 28 ignored. Two failing tests (gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 and gpu::recomp::pso::shader_cache_tests::console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk) also failed individually on current main 10d27297. The third (hle::d3d12x::alloc_pool::tests::submit_marking_calls_out_unlocked_and_revalidates_the_queue_marker) passed individually on both main and this PR head; its suite failure depends on parallel scheduling. This does not establish a clean workspace suite.
  • Earlier release sweep, on main e429936c and previous PR head a4230a2b: xcl shaders <retail shader pack> --direct --lanes --sample 256 --seed 1 --validate --split 0 --windows 4 --threads 2 --top 0, with XCL_NETWORK=0 on both. Each validated 215/256 sampled records (41 above 16,384 B skipped). Per-lane translation succeeded for 4/18 compute records; all 4 matched per-instruction DXIL on the PR head, totaling 144,516 B versus 139,532 B. Direct DXIL translated 122/215 on both, with no validator failures, panics, or timeouts. This sweep predates the latest rebase and contains no unmatched per-lane success; the regression test covers that case.

Regression run

Both used scripts/smoke.ps1 for 60 seconds, XCL_NETWORK=0, XCL_ACTIVITY=1, XCL_PREPARE=0, and no scripted input. The main block is from the earlier baseline; the PR block was rerun on the pushed head.

Main:

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

PR head:

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

Not tested

World loading, a complete retail sweep on the latest head, driver compile time, other adapters, or optional XCL_SAMPLE_* tests. The smoke runs cover startup; this offline measurement change does not establish a runtime speedup.

AI use

OpenAI Codex assisted with the patch and regression test, resolved rebase conflicts, ran the listed builds, tests, smoke runs and sweep, and updated this description from their output.

@DavidM1911

Copy link
Copy Markdown
Contributor

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

Thanks!

@throny throny added the goal:world-load Bears on the retail title getting past world loading label Nov 25, 2026
@moombathepilot
moombathepilot force-pushed the shaders/per-lane-sweep-validation branch from 9b0a4c3 to a4230a2 Compare November 28, 2026 12:43
@moombathepilot
moombathepilot force-pushed the shaders/per-lane-sweep-validation branch from a4230a2 to 879dce5 Compare November 28, 2026 18:09
@moombathepilot
moombathepilot marked this pull request as ready for review November 28, 2026 18:14
@JJAutoCompare

Copy link
Copy Markdown

Tested

Independently reran the pinned standalone CPU executable at 879dce5d3c35c900a51a71dd937532be8ca7e98a on Windows 11 x64 build 26200.9974 with a Ryzen 7 3800X. It was built with Rust 1.100.1 (x86_64 MSVC). The harness used byte-identical copies of the sweep accounting code, the refusal normalization helper, and the stock control.

lane_sweep.exe shaders::tests::per_lane_sweep_progressively_accounts_for_mixed_normalized_refusals --exact --nocapture --test-threads=1
lane_sweep.exe shaders::tests::per_lane_sweep_totals_include_only_matched_outputs --exact --nocapture --test-threads=1

Both native processes exited 0 with empty stderr. Total was 2 passed, 0 failed, 0 ignored, 0 skipped. The synthetic fixture asserted the counters after each of eight inputs and ended with 8 tried, 3 translated, and 2 paired. The paired totals were 46 B per-lane and 24 B per-instruction. The asserted refusal buckets were validator: invalid operand N (2), timeout: over N s (2), and unsupported opcode DS_TEST (1). The stock accounting control passed separately.

Not tested

The CLI sweep, real translation and validation, timeout or panic behavior, concurrent workers, GPU, retail titles, and the Cargo workspace suite.

AI use

T3 Code through Codex (gpt-6.2-sol, high) prepared the standalone fixture, verified the source slices and executable pin, independently reran both tests, and drafted this report.

@futurepro62

Copy link
Copy Markdown

NVIDIA and AMD full-suite run of head 879dce5d, on its own base 10d2729 and merged with current main 53e85fb1, to go with the reports above by JJAutoCompare, since none of them names a GPU. Nothing here fails because of this PR. On the Radeon the lib test binary stops partway on this base and on main alike (#3488), so the AMD runs are partial. The bare-head runs come first.

Tested

Not tested

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.

@Foniass

Foniass commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Triage (#1607) – head 879dce5

No open or merged PR makes this change. Main's direct_sweep still adds 0 to lanes_vs when the per-instruction form fails, so its per-lane size comparison is skewed, which LaneSweep::record fixes. No problems found in the diff. The Build and test check failed on the last run (its log has expired) and should be rerun.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

goal:world-load Bears on the retail title getting past world loading

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants