Recompiler: skip split-wave64 v_readfirstlane_b32 exchanges for wave-uniform VGPRs #1193
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1193
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1193"
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?
@zondy1i on GitHub · 2026-11-24 13:04 UTC · original
zondy1i:recomp/x64-uniform-readfirstlane→main· +464 −2 · 4 files · 1 commits · open��Eliminates split-wave64
xcl_x_rla_uniform()(xcl_x_meet()) cross-half exchanges forv_readfirstlane_b32when the source VGPR holds a wave-uniform value under guaranteedEXEC != 0.Why
udivchains (v_cvt_f32_u32�!v_rcp_iflag_f32�!v_mul_legacy_f32�!v_cvt_u32_f32) on VALU with scalar inputs and move the result back to an SGPR viav_readfirstlane_b32.docs/wave64-on-wave32.md), every suchv_readfirstlane_b32currently emitsxcl_x_rla_uniform()(a groupsharedxcl_x_meet()barrier) even though every active lane computed the exact same scalar value.EXEC != 0is statically guaranteed (sofirst_lane(exec)always selects an active lane, never falling back to inactive lane 0) and the source VGPR was produced in the same basic block (with unchangedEXEC) by a chain of plain, full-32-bit-overwrite, lane-independent VALU ops over uniform inputs, we capture each producer in that chain into an immutable scalar temporary (uint tN = ...;) evaluated from uniform operands. Both 32-lane halves compute the exact sametNeven if one half has no active lanes (exec_lo == 0orexec_hi == 0), andv_readfirstlane_b32copiestNdirectly withoutxcl_x_meet().What is in it
crates/xcl/src/gpu/recomp/x64_uniform.rs: forward must-analysisexec_nonzero()tracking non-zero 64-bit SGPR pairs (EXEC, savedEXECvias_mov_b64/s_*_saveexec_b64/s_or_b64,s_cbranch_execz/execnz,saveexec+scc,LOOP_GUARDexits; bails out on unresolved indirect jumps; conservativeentry_nonzero = falsein kernel mode), in-block wave-uniform VALU chain analysis (analyze()), and 3 unit tests.crates/xcl/src/gpu/recomp/mod.rs: runx64_uniform::analyzein split-wave64 mode for Kernel / Compute / Mesh.crates/xcl/src/gpu/recomp/emit.rs: capture uniform temporaries only for PCs inx64_uniform.capture_pcs(zero extra locals elsewhere), substitute uniform VGPR inputs while evaluating captured producers, copy directly inv_readfirstlane_b32for PCs inx64_uniform.rfl_pcs, and clear live temporaries on block boundaries /EXECwrites / VGPR overwrites.crates/xcl/src/gpu/recomp/tests.rs: add GPU testgpu_split_wave64_uniform_readfirstlaneverifying 0-exchange scalarudivand float-add chains with only upper-half lane 40 active (exec_lo == 0, garbage in lower-half VGPRs) as well as the conservativeEXEC == 0fallback reading unmodified lane 0.Measured impact (RTX 3060 Ti, split-wave64)
xcl_x_rla_uniform()calls drop from 80,310 �! 64,658 ("15,652 exchanges, "19.5%).cs_6_6) and NVIDIA D3D12 PSO compile benchmarks on three retail compute shaders (before47efa2e�! after0d8bcd5):xcl_x_rla_uniform57 �! 12("78.9%), DXIL57,328 �! 41,168 B("28.2%), DXC347.8 �! 239.7 ms("31.1%), cold PSO323.6 �! 218.7 ms("32.4%).xcl_x_rla_uniform505 �! 463("8.3%), DXIL1,200,072 �! 1,179,728 B("1.7%), DXC26,612 �! 24,784 ms("6.9%), cold PSO28,313 �! 29,146 ms(noise within 3%).xcl_x_rla_uniform43 �! 13("69.8%), DXIL144,708 �! 133,000 B("8.1%), DXC1,343 �! 1,148 ms("14.6%), cold PSO1,859 �! 1,696 ms("8.8%).Tested
x86_64-pc-windows-msvc), debug + release.cargo test -p xcl --lib x64_uniform -- --test-threads=1: 3 passed, 0 failed.cargo test -p xcl --lib gpu_split_wave64 -- --test-threads=1: 6 passed, 0 failed (including newgpu_split_wave64_uniform_readfirstlane).cargo test --workspace -- --test-threads=1: 745 passed, 0 failed, 41 ignored (1 SKIPPED GPU test:gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware(no wave64)).Regression run
main:
PR:
Not tested
x64_uniformonly runs whensplit_wave64is active on wave32-only GPUs or forced viaXCL_SPLIT_WAVE64=1).AI use
v_readfirstlane_b32producers across the shader corpus, designed and implementedx64_uniform.rs+ emitter integration, wrote unit and GPU tests, ran the DXC/PSO benchmarks, and drafted the PR description; all tests, benchmarks, and paired smoke runs were executed locally on the hardware above and the diff was reviewed line by line.@Aniseto on GitHub · 2026-11-24 13:08 UTC · original
Ran the new uniform tests on an NVIDIA Blackwell part at
0d8bcd5:Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build.
All six split-wave64 GPU tests pass here, including the new
gpu_split_wave64_uniform_readfirstlane. This adapter has no native wave64, so the split form is the only path it runs. The author's run was an Ampere RTX 3060 Ti; this adds a Blackwell part with driver 32.0.16.2124 on Windows 11 build 26200.Not tested: native wave64 (not available here), RDNA2/RDNA4 and Intel GPUs, Wine, release profile, retail titles.
AI-assisted (OpenCode), model: DeepSeek V4.1 Flash 1017 - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified.
@juniorteixeiradev on GitHub · 2026-11-24 13:20 UTC · original
Ran the PR on NVIDIA Ampere (wave32 only, so split wave64 is the path in use) at head
0d8bcd5, whose base ismain47efa2e.Tested
cargo build --workspace && cargo test --workspace -- --test-threads=4on this PR's head: 745 passed, 0 failed, 41 ignored.main47efa2e, same machine: 741 passed, 0 failed, 41 ignored. The 4 extra tests are this PR's, and nothing else changed.SKIPPEDon both, as expected on a wave32-only adapter:gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64gpu::recomp::tests::gpu_split_wave64_uniform_readfirstlane. It ran on the GPU with--nocaptureand DXC loaded, and it was not skipped.gpu::recomp::x64_uniform::tests::scalar_div_chain_with_nonzero_exec_is_capturedgpu::recomp::x64_uniform::tests::cbranch_execz_and_saved_exec_restore_prove_exec_nonzerogpu::recomp::x64_uniform::tests::non_uniform_exec_maybe_zero_and_loop_exit_stay_conservativeNot tested
scripts/smoke.ps1run: no game files on this machine.AI use
@DavidM1911 on GitHub · 2026-11-24 13:21 UTC · original
Independent verification on current
main384f7f7(branch already contains it — clean).Machine: Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug; DXC 1.8.2502.11.
cargo test -p xcl --lib readfirstlane: 1 passed, 0 failed —gpu_split_wave64_uniform_readfirstlaneon real hardware (the newx64_uniformanalysis skips wave-uniform VGPR exchanges correctly).AI use: test runs by Devin (Cognition, SWE-2); no code changes.
@0xTehuti on GitHub · 2026-11-24 13:30 UTC · original
Test report on NVIDIA GeForce RTX 2070 SUPER (Turing, wave32)
Commit tested
0d8bcd58626ed825a860cc43664c238f00e02a0c(PR #1193 head)Tested
cargo test -p xcl --lib x64_uniform:3 passed; 0 failed; finished in 0.00scargo test -p xcl --lib gpu_split_wave64_uniform_readfirstlane:1 passed; 0 failed; finished in 0.29sxcl_x_rla_uniform()cross-half exchanges for wave-uniform VGPRs in split-wave64 executes cleanly on native wave32 Turing hardware.exec_lo == 0, garbage in lower half), the scalar value is preserved accurately across both halves, and the conservativeEXEC == 0fallback reads unmodified lane 0 as expected.Not tested
AI use
@JoaoPauluu on GitHub · 2026-11-24 13:57 UTC · original
A run on Linux with vkd3d-proton, where the shaders go through dxil-spirv to Vulkan instead of a Windows driver's DXIL compiler.
Tested
x86_64-pc-windows-gnu.0d8bcd5as it is (based on47efa2e), no uncommitted changes. The lib test binary runs under Wine, one test per process (--exact).gpu::recomp::tests::gpu_split_wave64_uniform_readfirstlane: ok, no SKIPPED.gpu::recomp::x64_uniform::tests::cbranch_execz_and_saved_exec_restore_prove_exec_nonzero: ok, no SKIPPED.gpu::recomp::x64_uniform::tests::non_uniform_exec_maybe_zero_and_loop_exit_stay_conservative: ok, no SKIPPED.gpu::recomp::x64_uniform::tests::scalar_div_chain_with_nonzero_exec_is_captured: ok, no SKIPPED.Not tested
AI use
@SlopTart on GitHub · 2026-11-24 14:36 UTC · original
Counter-datapoint from the axis every report above skips: native wave64 hardware (AMD RDNA3) with the split path forced. All five runs so far are NVIDIA wave32 parts where split-wave64 emulation is the only path; here it has to coexist with real 64-lane waves, so I ran it with
XCL_SPLIT_WAVE64=1.Lane:
mainb8b1f49+ this PR's head0d8bcd5(mergef3cb238). Control: plainb8b1f49. BothXCL_SPLIT_WAVE64=1 --test-threads=1, same session, 3 reps each. Counts only:gpu_split_wave64_waves_diverge3/3 ok,gpu_split_wave64_lane_local_masks3/3 ok,gpu_split_wave64_local_and_exchanged_masksandmasks_read_whole_after_partial_writes3/3 FAILED (the documented split cluster on this rig, #847).lane_local_masksstill ok, butwaves_divergeflips to 3/3 FAILED (signature:ds_bpermuteassertion at group 0 thread 96, got 0 expected 65 - exchange value loss), and this PR's own new testgpu_split_wave64_uniform_readfirstlanefails 3/3. The new test passes its static check (the HLSL really does drop all but the definition ofxcl_x_rla_uniform) and fails the GPU value check attests.rs:5834:s6=613566656 expected~=613566720, so the uniform-skip path yields a 64-ulp-wrong readfirstlane result when only upper-half lane 40 is active. It also failed in a full-suite run on an earlier head of this PR.waves_divergefails on this rig at47efa2e(this PR's base; 3/3 red this morning and 3/3 red again this afternoon) but passes 3/3 on current mainb8b1f49, and goes red again with this PR merged on top. So on RDNA3 this head re-introduces an exchange corruption current main does not have.Net on this axis: strictly worse - two tests that pass on the control go red, none go green, and the PR's own test fails its numeric assert. Caveat kept honest: this rig's split cluster is finicky (#847), so single green runs prove nothing; the pattern above is consistent 3/3 both directions in one session. Happy to re-check a future head with the same 3x fix-vs-control combo.
Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross
x86_64-pc-windows-gnu,XCL_NETWORK=0, release profile. My Linux rows: #42 / #718.AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
@zondy1i on GitHub · 2026-11-24 14:49 UTC · original
Thanks for testing the forced-split RDNA3/RADV path — super useful catch on the test assertion!
Regarding
gpu_split_wave64_uniform_readfirstlane:s6 = 613566656vsexpected = 613566720is not a uniform-skip bug — it is a 1-ULPfloat32rounding difference in hardwarercp(7.0f)where our test tolerance (<= 2) was too tight for AMD RDNA3:(uint)(rcp(7.0f) * 4294967040.0f)(~6.135e8, exponent2^29).2^29, 1 singlefloat32ULP is2^(29 - 23) = 64.rcp(7.0f)as0x3e124925(613566720), whereas AMD hardwarev_rcp_f32(7.0f)returns0x3e124924(1 ULP lower, legal per HLSLrcp), which scales to613566720 - 64 = 613566656.613566656instead of the0xDEAD_0000garbage preloaded in lane 0 confirms the upper-half-only (exec_lo == 0) uniform capture path computed and returned the exact RDNA3 scalar value without an exchange.I pushed
7c16823relaxing only that test'srcpassertion from<= 2to<= 128(2 float32 ULPs at2^29), with no changes to the recompiler or analysis. Regardingwaves_diverge, note that this PR'sx64_uniformpass only touchesv_readfirstlane_b32and does not touchds_bpermuteor the exchange protocol (#847). If you re-rungpu_split_wave64_uniform_readfirstlaneon7c16823, it should now pass cleanly on RADV too!AI use: Antigravity (Gemini 4 Neon) analyzed the
float32ULP arithmetic, pushed the 1-line test tolerance fix (7c16823), and helped draft this reply.@mastrr9 on GitHub · 2026-11-24 15:30 UTC · original
Verified head
7c16823287be1058d6cf89fe0603b9d5005b2f2aon Windows 11 / NVIDIA RTX 5080 (wave32 / split-wave64, DXC 1.9.2602.17, Rust MSVC, debug build, clean worktree):cargo test -p xcl --lib -- gpu::recomp --test-threads=4: 192 passed, 0 failed, 18 ignored (0 new compiler warnings).Not tested: AMD native wave64, full workspace, retail smoke (
scripts/smoke.ps1).AI use: T3 Code (Antigravity / Claude Sonnet 5.5) ran the build and tests on our RTX 5080 and drafted this report.
@Mykolas009 on GitHub · 2026-11-24 15:49 UTC · original
Tested on NVIDIA Blackwell: head
7c16823merged ontomain930e8b4(clean merge, not pushed).Windows 11 Pro 26300; Rust 1.100.0 MSVC; DXC 1.9.2602.17.
cargo build --workspace+cargo test --workspace --no-fail-fast -- --test-threads=4(debug):755 passed, 0 failed, 41 ignored (
mainalone: 751 / 0 / 41). SKIPPED:gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64). The 4 new tests pass.Speed, since no report has timings yet. A local benchmark (not for a PR, built like
bench_split_wave64:2^18 threads, 32,768 loop iterations, GPU timestamps, median of 9, release), 2 runs each:
mainv_cvt_f32_u32of an SGPR,v_cvt_u32_f32,v_readfirstlane(uniform)v_readfirstlaneof a lane valuev_readfirstlaneof lane valuesAbout 9x faster in the uniform case, the same for 64- and 256-thread groups, and no change where the value is
not uniform. The wave64 output of every case is identical with and without the PR.
Not tested
emit.rsfrommainthe tree does not build(
no field x64_uniform), so I did not separate it further; the benchmark shows the exchange removed.AI use
@SlopTart on GitHub · 2026-11-24 17:31 UTC · original
AMD side of the new head
7c16823, and a correction to my earlier regression claim.Same rig and forced split mode (
XCL_SPLIT_WAVE64=1, native wave64 card forced to the split path,--test-threads=1):0d8bcd5): this PR's own test failed 3/3 here andwaves_divergewent red vs the control. Both are fixed now:gpu_split_wave64_uniform_readfirstlanepasses 1/1 in forced mode, andgpu_split_wave64_waves_divergepasses with and without this PR. I withdraw the regression claim.mainb7aa9f3b, not this PR: forced split mode on current main fails 3 of the renamed family:gpu_split_wave64_local_and_exchanged_masks_in_diverging_wavesfails attests.rs:5970, left157right164(mask mismatch, same family as the pair I reported in #847)gpu_split_wave64_masks_read_whole_after_partial_writesfails attests.rs:5860:71gpu_split_wave64_cross_half_operationspanics attests.rs:5727:48Same three also fail at this PR's head (identical deltas), so the PR neither fixes nor worsens them; they are pre-existing failures against current main. Unforced on the same card: 6/6 green, so this is split-path specific. The two NVIDIA reports on this thread (RTX 5080, RTX 5060) run the split form natively and see all green, which points at something in the split simulation on native-wave64 cards (mask merging across halves), consistent with #847.
Counts only, no game data.
Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross
x86_64-pc-windows-gnu,XCL_NETWORK=0, release profile; control run taken in the same session at the same main tip. See my Linux rows in #42 / #718.AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
@JJAutoCompare on GitHub · 2026-11-25 07:01 UTC · original
Tested
PR #1193 was open at
5ae60ad0a9baefd8baa244f36f9e5712f83b37d4before and after the run. The detached checkout was clean at that SHA. The PR description includes NVIDIA results, and the discussion covers earlier NVIDIA and forced-split AMD runs. I found no equivalent same-head Intel Arc result in the PR discussion or issue #42.STOR-WINLAB ran Windows 11 Enterprise Evaluation 25H2 x64 build
26200.9974, AMD Ryzen 7 3800X, and Intel Arc A770 driver32.0.101.9175. Rust1.100.0 (0ef1bc386 2026-11-09)targetedx86_64-pc-windows-msvc. DXC and DXIL were1.9.2609.5from%LOCALAPPDATA%/XclTooling/dxc-1.9.2609/bin/x64.The prebuild ran outside the Arc mutex, with
CARGO_TARGET_DIR=L:/XclTooling/pr1975-b62e6e3/target, privateTEMPandTMPatL:/XclTooling/pr1193/temp,CARGO_BUILD_JOBS=2,CARGO_INCREMENTAL=0, andCARGO_PROFILE_DEV_DEBUG=CARGO_PROFILE_TEST_DEBUG=0(both variables set individually). The target stayed exclusive through test exit. Process-scopedRemoteSignedallowed the trusted wrapper to run. The test usedXCL_ADAPTER=A770, the DXC folder above viaXCL_DXC_DIR, andXCL_REQUIRE_GPU=wave64.XCL_SPLIT_WAVE64andXCL_DIRECT_DXILwere unset.The executable SHA-256 was
1A18DA96CE234223C8CB000AF410EA2FD15DE937B44272102FD202A4C1D2FD13both before waiting and after acquiring the mutex. The earlier same-host D3D12 capability log reports Arc A770 hardware waves of 8–32 lanes. The checked-in runner therefore selected stock split-wave64, compiled both synthetic kernels via HLSL/DXC, and dispatched them on D3D12.1 passed, 0 failed, 0 ignored, 0 GPU skips, 1,082 filtered out, 0.31 s, wrapper exit 0. The build completed with two Rust deprecation warnings. PowerShell formatted the fixture's DXC version message as
NativeCommandErrorbecause it came from stderr. The fixture completed successfully.xcl_x_rla_uniformcalls. The GPU readback satisfieds6within 128 of the scaled reciprocal reference ands7 == 3. Lane 40'sv3became3, and inactive lane 0'sv3retained0xBEEF0000.s6 == 0x12345678, the value seeded in lane 0'sv1.Not tested
Native wave64, forced split on a native-wave64 adapter, Direct DXIL, other GPUs, other fixtures, the full workspace suite, retail smoke, and performance.
AI use
T3 Code / Codex (
gpt-6.2-sol) verified the PR and fixture, ran the focused test, checked the logs, and wrote this report.@thehollowedone on GitHub · 2026-11-25 11:01 UTC · original
Independent Windows run on 5ae60ad. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti (621.35), Rust 1.99.1 MSVC, DXC 1.8.2502.11, debug.
cargo build --offline --locked --workspacepassed.cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --nocapturereported 1,106 passed, 0 failed, 46 ignored, with 24 runtime skips included in Cargo's pass count. The stock uniform readfirstlane test passed.For a separate synthetic check, LLVM MC 23.1.6 assembled a gfx1030 kernel with a branch on empty EXEC and a uniform float-add and conversion feeding
v_readfirstlane_b32. I fed its 24-byte .text directly to XCL's HLSL/DXC runner. The RTX matched 3 scalar results and all 192 lane values across lower-half-only, mixed-half and empty EXEC. The optimized HLSL emitted zero cross-half exchange calls. With the optimization disabled in the same scratch checkout, it emitted one exchange call and returned the same values.XCL_REQUIRE_GPU=wave64withcargo test --offline --locked -p xcl --lib gpu_split_wave64_llvm_uniform_mask_edges -- --nocapture --test-threads=1passed 1/0/0 with zero fixture skips in each run. This covers HLSL split-wave64 on wave32 hardware. Retail, native wave64, Direct DXIL and performance were outside this check. AI-assisted. Codex (GPT-6, exact variant unavailable) wrote the scratch fixture, ran the tests, and drafted this report.@raylitebull on GitHub · 2026-11-25 11:06 UTC · original
Diff review on
5ae60ad(x64_uniform.rs+emit.rs+tests.rs) looks clean, CI is green, and RTX 3060 Ti, RTX 3080 Ti, and Arc A770 checks all pass on5ae60ad.Only item remaining before merge is a quick
XCL_SPLIT_WAVE64=1AMD check (gpu_split_wave64_uniform_readfirstlane) on exact head5ae60ad(the earlier RADV run was on pre-rebase7c16823).@oni-swr on GitHub · 2026-11-26 01:45 UTC · original
Test report: Windows AMD RX 7800 XT, forced split wave64, exact head
5ae60adCommit tested:
5ae60ad0a9baefd8baa244f36f9e5712f83b37d4(PR head, detached clean checkout). Control: exact parent8f5fca5bb9ad6e695093d75294ad2cec023bba60.Hardware / toolchain: AMD Radeon RX 7800 XT (RDNA3, physical; driver 32.0.31035.1003), Ryzen 7 5700X3D, Windows 11 Pro build 26200, Rust 1.100.0 MSVC, debug, DXC from Windows Kits 10.0.26100.0.
Adapter and path: a temporary probe test (not committed, removed afterwards) printed
adapter=AMD Radeon RX 7800 XT wave64=true wave32=true. WithXCL_SPLIT_WAVE64=1it showedsplit_wave64_forced()=true runner::split_wave64()=true, and with the variable unsetfalse/false. So the HLSL exchange-count assertions in the new test were active in the forced runs.Head
5ae60ad,XCL_SPLIT_WAVE64=1cargo test -p xcl --lib -j 4 -- x64_uniform gpu_split_wave64 readfirstlane gpu_bench_really_runs --test-threads=1: 11 passed, 0 failed, 0 ignored. Coverage:gpu_split_wave64_uniform_readfirstlane: the uniform chains under a proven non-zero EXEC with only lane 40 active (exec_lo == 0), and the EXEC-may-be-0 case.gpu_split_wave64_cross_half_operations,_waves_diverge,_local_and_exchanged_masks_in_diverging_waves._lane_local_masks,_masks_read_whole_after_partial_writes,_reduction_tails.x64_uniformunit tests.gpu_split_wave64_uniform_readfirstlanealone, run 5 times: 5/5 passed.cargo test -p xcl --lib -j 4 -- gpu::recomp --test-threads=4: 345 passed, 0 failed, 19 ignored.Head
5ae60ad, native wave64 (variable unset):-- gpu_split_wave64 x64_uniform --test-threads=1: 10 passed, 0 failed, 0 ignored.Exact parent
8f5fca5,XCL_SPLIT_WAVE64=1gpu_split_wave64_*tests).-- gpu::recomp --test-threads=4: 341 passed, 0 failed, 19 ignored. The 4 tests the head adds account for the difference.only definition, 0 callswithleft: 3, right: 1: the parent emits 2xcl_x_rla_uniformexchanges where the head emits none.s6,s7 == 3, lane 40 / lane 0v3, and EXEC == 0 reading the old lane 0 (whose "definition + 1 exchange kept" count also holds).SKIPPED: none from the filtered tests. The
gpu::recompruns print 6SKIPPEDsub-case lines inside the passinglower_dxil::tests::f16_programs_on_the_gpuandf32_programs_on_the_gpu: per-lane form refusals ofV_MUL_F16,V_PK_MUL_F16andV_CVT_F16_F32. Head and parent print the same lines.Not tested: the whole workspace suite, NVIDIA / Intel, RDNA2 / RDNA4, release builds, a retail title or
scripts/smoke.ps1.AI use: Claude Code (Claude Opus 5.5) ran the commands on this machine and wrote this report.
@DavidM1911 on GitHub · 2026-11-26 03:52 UTC · original
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
@Prime1997 on GitHub · 2026-11-26 13:16 UTC · original · reviewed
Needs changes: exhausted shared loop budget can produce a false EXEC-nonzero proof. Exact PR head
5ae60ad0a9baefd8baa244f36f9e5712f83b37d4.The runtime loop guard runs before a loop's first instruction, and its budget is shared across loops.
x64_uniform::exec_nonzeroadds guard-exit edges using only post-instruction facts. If an earlier loop exhausts the budget, a later loop beginning withs_mov_b64 exec, -1is skipped. The analysis nevertheless propagates that nonzero EXEC fact past the second loop. A following predicated VGPR move must preserve the old value with EXEC zero, while the optimized readfirstlane can return its unconditional captured scalar instead.Measured CPU regression: an isolated checkout with production code unchanged and one seven-instruction analysis fixture added produced 0 passed, 1 failed, 0 ignored, 0 skipped, at the false nonzero proof. The positive nonzero control ran before that assertion. Test-only source patch SHA-256:
642ab6d8895c86a270727dfb0f565707565204e1e7a5a0f898e6a61787db2a52.A separate, uncommitted local repair makes guard-exit facts conservative over both pre- and post-instruction states, including the SCC relation. The identical regression plus all three original CPU analysis fixtures produced 4 passed, 0 failed, 0 ignored, 0 skipped. Repair source patch SHA-256:
c51b1a9f9ad4547389f675ba3962945fab021d869d403ebdf5e4e1b55381d5fc. This repair is local and has not been pushed into the PR.Exact filters:
gpu::recomp::x64_uniform::tests::exhausted_shared_loop_budget_does_not_prove_exec_nonzerogpu::recomp::x64_uniform::tests::scalar_div_chain_with_nonzero_exec_is_capturedgpu::recomp::x64_uniform::tests::cbranch_execz_and_saved_exec_restore_prove_exec_nonzerogpu::recomp::x64_uniform::tests::non_uniform_exec_maybe_zero_and_loop_exit_stay_conservativeBuild each isolated worktree:
cargo test --locked --offline -p xcl --lib --no-run --message-format=json --target-dir <isolated-target>. Run each filter in a fresh process:<test-exe> <exact-filter> --exact --test-threads=1 --nocapture. Windows 11 Pro26200, i5-10400, 32GiB, Rust1.100.0 MSVC debug; private paths are placeholders.Not tested: no shader loop was dispatched, no DXC/device call occurs in these finite analysis fixtures, and no GPU/title correctness or whole-suite result is claimed. Latest main
b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7has the same shared guard but not this optimization; the local repair was tested on the PR head, not a rebased integration. Source locations:x64_uniform.rs:115–120,147–149;mod.rs:638,1017,1138;emit.rs:6077.AI use: Codex (GPT-6) reviewed the source and checked the stated evidence. Optional temporary Discord for coordinating contributor work, testing and comparing results.
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.