Shaders: validate and pair per-lane sweep results #1846
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1856"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by moombathepilot on 2026-11-24T21:57:02Z.
xcl shaders --direct --lanessupports 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--validateis 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
32.0.32029.2010, Ryzen 7 5700X3D, Windows build26300.9974, Rust1.100.0MSVC, DXC/DXIL1.9.2602.17.879dce5d3c35c900a51a71dd937532be8ca7e98a, rebased onto main10d272970f25b02b72ebe3c883d02d74d4d4763b:cargo build --release -p xcl --bin xclpassed;git diff origin/main...HEAD --checkpassed.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=4stopped in the xcl library: 2015 passed, 3 failed, 28 ignored. Two failing tests (gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1andgpu::recomp::pso::shader_cache_tests::console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk) also failed individually on current main10d27297. 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.e429936cand previous PR heada4230a2b:xcl shaders <retail shader pack> --direct --lanes --sample 256 --seed 1 --validate --split 0 --windows 4 --threads 2 --top 0, withXCL_NETWORK=0on 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.ps1for 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:
PR head:
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.
upstream-sync referenced this pull request2026-11-24 23:06:49 +00:00
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T01:28:50Z.
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 referenced this pull request2026-11-25 05:07:03 +00:00
upstream-sync referenced this pull request2026-11-25 14:08:43 +00:00
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-28T18:52:02Z.
Tested
Independently reran the pinned standalone CPU executable at
879dce5d3c35c900a51a71dd937532be8ca7e98aon 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.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), andunsupported 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.Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-30T02:39:54Z.
NVIDIA and AMD full-suite run of head
879dce5d, on its own base10d2729and merged with currentmain53e85fb1, 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 onmainalike (#3488), so the AMD runs are partial. The bare-head runs come first.Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace --no-fail-fast -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::bridged_dpp_agrees_with_hlsl_on_the_gpu --skip hle::d3d12x::bind::tests::two_pass_binds_set_the_shared_view_heap --skip gpu::dxil::fuzz_tests: 2141 passed, 0 failed, 46 ignored. SKIPPED (no wave64):a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu,a_per_lane_2d_or_3d_group_runs_on_the_gpu,coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu,cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu,dispatch_chain_native_wave64_builds_whole,gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware,the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.XCL_ADAPTER=radeon),cargo test --workspace --no-fail-fast -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 --skip two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs: 134 passed, 0 failed, 20 ignored, incomplete: thexcllib test binary stopped itself partway (exit code0x80004005, aftersparse upload preparation still failed after bounded retries), so most of its tests did not run. That stop comes from #2959 onmainand is not this PR's: #3488.--skipleaves out tests that fail on main53e85fb1too, not because of this PR. On NVIDIA:heap_window_out_of_memory_falls_back_to_the_switch_form(#1651), the fourgpu::recomp::lower_dxil::tests::*_programs_on_the_gputests,const_and_null_mask_operands_agree_with_hlsl_on_the_gpuandmask_ff0_and_flbit_agree_with_hlsl_on_the_gpu(follow-up on #1651) fail becauserunner::skip_testturns their skips into failures underXCL_REQUIRE_GPU=mesh,bridged_dpp_agrees_with_hlsl_on_the_gpu(no wave64 on this card) andtwo_pass_binds_set_the_shared_view_heap(heap windows are opt-in,XCL_HEAP_WINDOWS=1) fail the same way;gpu::dxil::fuzz_testsstays skipped as in earlier runs (seeds 70, 545, 1019 and 1507 failedCreateComputePipelineStatewithE_OUTOFMEMORYon this card; they passed on this main's baseline). On AMD:fuzz_validate_and_gpu_1fails on seed 540 (res[833]0x7 vs CPU 0x6).two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobsfails on main too, since #2959 (#3441). The AMD run does not setXCL_REQUIRE_GPU.main53e85fb1(git merge --no-ff, clean, local only), same commands and skips. NVIDIA: 2779 passed, 1 failed, 47 ignored; the one failure isconcurrent_shell_miss_reuses_winner_and_releases_loser_pipeline, which fails onmainitself since #2369 (already reported there: https://github.com/xcl-dev/xcl/pull/2369#issuecomment-7264263758). AMD: 138 passed, 0 failed, 20 ignored, incomplete: the same #3488 stop, and before itgpu_compact_form_with_micro_blocks_and_literal_table_runs_as_the_plain_form(new onmainwith #3263) fails the same way on baremain53e85fb1.main53e85fb1on both cards, same commands without skips, for comparison: NVIDIA fails the skipped tests plus the #2369 test; the Radeon stops at the same place.Not tested
AI use
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T07:00:08Z.
Triage (#1607) – head
879dce5No open or merged PR makes this change. Main's
direct_sweepstill adds 0 tolanes_vswhen the per-instruction form fails, so its per-lane size comparison is skewed, whichLaneSweep::recordfixes. No problems found in the diff. TheBuild and testcheck 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.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.