Recompiler: bridge non-native DPP16/DPP8 VALU ops in the per-lane form #1845
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!1845
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1845"
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?
@emirduran707 on GitHub · 2026-11-24 21:44 UTC · original
emirduran707:recomp-per-lane-dpp-bridge→main· +122 −10 · 4 files · 1 commits · openIn the per-lane direct DXIL backend (#1745), non-native VALU instructions with DPP16 or DPP8 modifiers (such as float wave reductions with
v_add_f32_dpp/v_max_f32_dpp, or DPP16 source modifiersSRC0_ABS/SRC0_NEG) failed to lower:valu()eagerly ranself.dpp(), DPP source modifiers returned a hard error without theunsupportedprefix, andbridge()calledLw::inst_guardedwithmask = None, soLw::exec_mask()read SSA EXEC (register 126) and failed the per-lane register check. Part of #1269.Ir::foreignnow passes an optional active-lane mask through toLw::inst_guarded. For bridged DPP16/DPP8 instructions,bridge()checksall_laneswhen fetch-inactive (FI) is set and passes the half-wave EXEC ballot (exec_words(b, true)).Lw::sourcesalso clamps inactive DPP16/DPP8 source lane indices toself.lanebeforeread_lane_halfsoWaveReadLaneAtnever reads an inactive lane.What is in it
crates/xcl/src/gpu/recomp/lower.rs: addmask: Option<(Self::V, Self::V)>toIr::foreign; skip eagerself.dpp()for non-native VALU opcodes (keepingV_CMP*_dpprefused); inbridge(), enforceall_lanesforFI=1and passexec_words(b, true)for DPP16/DPP8.crates/xcl/src/gpu/recomp/lower/wave.rs: makeall_lanesandexec_wordspub(super); prefix DPP modifier refusal withunsupportedso it can bridge.crates/xcl/src/gpu/recomp/lower_dxil.rs: forwardmasktoself.lw.inst_guarded, and add GPU parity testbridged_dpp_agrees_with_hlsl_on_the_gpu(wave32 and wave64, DPP16, DPP16SRC0_NEG+ROW_MASK, DPP8, and narrowed EXEC withBOUND_CTRL=0andBOUND_CTRL=1).crates/xcl/src/gpu/dxil/lower_valu.rs: clamp inactive DPP16/DPP8 source lanes toself.lanebeforeread_lane_half.Tested
cargo build --workspace, thencargo test --workspace --no-fail-fast -- --test-threads=4onf65c9d5b(rebased ontomain08db8020):1428 passed, 2 failed, 47 ignored; 8 SKIPPED(6 inlower_dxil::tests::{f16,f32}_programs_on_the_gpu;heap_window_out_of_memory_falls_back_to_the_switch_form;pso_measurement_compiles_an_exact_synthetic_record)gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1seed 722 andfuzz_validate_and_gpu_3seed 1599) are pre-existing on unmodifiedmainon this GPU.bridged_dpp_agrees_with_hlsl_on_the_gpubefore the change failed (wave32: unsupported V_ADD_F32 (it reads register 126 the per-lane form did not pass)); passes on both wave32 and native wave64 afterRegression run
main (
b49be183):this PR (
f65c9d5b):Not tested
WaveSize(32)) GPUs (NVIDIA / Intel / wave32-only).V_CMP*_dpp(still refused, sincedxil/lower_valu.rsonly appliesdpp_enableto VGPR destinations).AI use
main08db8020and reran the full workspace suite and smoke pair.main2aa2d1a(resolving a test conflict incrates/xcl/src/gpu/recomp/lower_dxil.rs).@WebIdentity1 on GitHub · 2026-11-24 22:02 UTC · original
I checked the NVIDIA gap in this PR on exact head
e5ccb4968e383dc1ebd40b24e6f414f1b829df6awith the RTX 3090 (Windows 10 19045, driver 591.74, Rust 1.98.1 MSVC debug, DXC 1.8.2502.11). The stockbridged_dpp_agrees_with_hlsl_on_the_gpupassed 1/0/0, but its stderr explicitly saysSKIPPED ... bridged_dpp, wave64: no wave64; it exercised only wave32.I made a test-only overlay in
lower_dxil.rsthat accepts split wave64 as a supported console program, setsOptions::split_wave64for the HLSL reference, and callskernel_splitfor the direct DXIL side. In a fresh desktop-session process withXCL_ADAPTER=3090and no forced split override, that same test passed 1/0/0, zero skips. Its log shows bothwave32 split=falseandwave64 split=true; it compared direct-DXIL and HLSL GPU readbacks for v1–v7 on all 64 console lanes. Both 303-file Windows source trees matched their SHA-256 manifests before and after, and there was no timeout or device removal.This answers the PR's stated wave32-only NVIDIA coverage gap for this synthetic DPP fixture. It does not establish retail rendering, the full workspace suite on this head, or other DPP encodings. The overlay changes only the test; no runtime code was committed or pushed. The small patch is below for integration into this PR if useful.
@frenziedcoder on GitHub · 2026-11-24 22:08 UTC · original · edited 2026-11-24 22:26 UTC
NVIDIA test report for
e5ccb49: full suite green, its own GPU test skipped here (no wave64), and a clean smoke pair on the retail title (1651 vs 1653 frames).Tested
stable-x86_64-pc-windows-msvc, DXC 1.8.2502.11 (SDK 10.0.26100.0). Exact heade5ccb4968e383dc1ebd40b24e6f414f1b829df6a, no local changes.cargo build --workspace && cargo test --workspace -- --test-threads=4(debug): 960 passed, 0 failed, 43 ignored; the PR's own testbridged_dpp_agrees_with_hlsl_on_the_gpuSKIPPED here. SKIPPED:gpu::recomp::lower::tests::a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu(no wave64),gpu::recomp::lower::tests::coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu(no wave64),gpu::recomp::lower::tests::cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu(no wave64),gpu::recomp::lower::tests::the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu(no wave64),gpu::recomp::lower_dxil::tests::a_per_lane_2d_or_3d_group_runs_on_the_gpu(no wave64),gpu::recomp::lower_dxil::tests::bridged_dpp_agrees_with_hlsl_on_the_gpu(bridged_dpp, wave64: no wave64),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))),gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu(f16 arithmetic, wave64: no wave64),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))),gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu(f16 packed, wave64: no wave64),gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu(f32 arithmetic, wave64: no wave64),gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu(f32 compares, wave64: no wave64),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))),gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu(f32 conversions, wave64: no wave64),gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu(f32 rounding, wave64: no wave64),gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu(f32 three-source, wave64: no wave64),gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu(f32 transcendentals, wave64: no wave64),gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu(f64, wave64: no wave64),gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu(integer arithmetic, wave64: no wave64),gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu(integer carries, wave64: no wave64),gpu_geometry_wave32_prefix_count_over_a_mask(no wave64),gpu_wave32_program_in_wave64_hardware(no wave64),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).bridged_dpp_agrees_with_hlsl_on_the_gpuSKIPPED on this card (no wave64: NVIDIA runs 32-lane waves only), so the change itself is not exercised by its test here; this report covers the rest of the suite and the smoke pair.test_title_draws_with_a_root_signature_under_the_debug_layerreports ok, but this machine has no D3D12 debug layer (debug layer requested but unavailable … (0x887A002D)), so it ran without the layer and is no evidence either way.Regression run (
scripts/smoke.ps1 -Seconds 60, release, the retail title of #505 at its start screen;XCL_PSO_PRELOAD=0for both builds, because this machine's preload list holds the program of #1307)base (
c4d37be, this PR's merge base withmain):this PR:
Not tested: this code in the title: it is on the opt-in direct-DXIL path (
XCL_PER_LANE=1withXCL_DIRECT_DXIL), which the smoke runs leave unset (default HLSL backend), so they show only that nothing else regressed; the world load (the smoke runs stop at the start screen, so code that only runs later is not exercised there); AMD.AI use: Claude Code (Claude Opus 5.5) built and ran the tests and smoke runs on my machine and wrote this report; I checked it.
@DavidM1911 on GitHub · 2026-11-25 01:15 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
@JJAutoCompare on GitHub · 2026-11-25 03:27 UTC · original
Arc A770 verification for PR #1845
Tested open PR head
0f2344c953f91316a525f28240ddc2edbf6ff5d3. The assigned checkout was clean and detached at that SHA before and after the run. The live PR discussion and issue #42 contained no equivalent Arc report for this revision.Tested
x86_64-pc-windows-msvc), unoptimized test profile. The fixture logged loading DXC1.9.2609.5 (01b62ad4)and DXIL1.9.2609.5from%LOCALAPPDATA%/XclTooling/dxc-1.9.2609/bin/x64.cargo test --locked -p xcl --lib --no-runoutside the Arc lock. Used the assignedL:/XclTooling/pr1778-2e2ee55-20261125-020159/targetwithCARGO_BUILD_JOBS=2,CARGO_INCREMENTAL=0,CARGO_PROFILE_DEV_DEBUG=0, andCARGO_PROFILE_TEST_DEBUG=0. SetXCL_ADAPTER=A770andXCL_DXC_DIRto the path above.powershell.exe -NoProfile -ExecutionPolicy RemoteSignedprocess, using the executable path reported by Cargo:v1–v7on all 32 lanes (224 comparisons). The full-EXEC cases exercised DPP16V_ADD_F32withrow_shr:1andBOUND_CTRL=1, DPP16V_MAX_F32with reversed quad permutation,SRC0_NEG=1,ROW_MASK=0xA, andBOUND_CTRL=0, and DPP8V_ADD_F32with reversed eight-lane selection andFI=0. With EXEC narrowed to even lanes, the fixture repeated the DPP16 add withBOUND_CTRL=0and1and repeated the DPP8 add, then restored EXEC.SKIPPED gpu::recomp::lower_dxil::tests::bridged_dpp_agrees_with_hlsl_on_the_gpu: bridged_dpp, wave64: no wave64. This skipped the entire 64-lane iteration before shader compilation, GPU dispatch, or comparisons for those cases.Not tested
AI use
gpt-6.2-solran the fixture and wrote this report.@thehollowedone on GitHub · 2026-11-25 11:58 UTC · original
Independent Windows run on 0f2344c. 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,138 passed, 0 failed, 46 ignored, with 26 runtime skip notices included in Cargo's pass count.A scratch extension of the checked-in fixture ran both native wave32 and split wave64. HLSL and per-lane Direct DXIL matched across 864 register values. Two additional DPP16/DPP8 fetch-inactive instructions ran with only even lanes in EXEC. Both instruction encodings matched LLVM MC 23.1.6 for gfx1030. All 192 output words for those two instructions matched the CPU reference, including preserved inactive destinations.
cargo test --offline --locked -p xcl --lib bridged_dpp_agrees_with_hlsl_on_the_gpu -- --nocapture --test-threads=1passed 1/0/0 with zero skips in the scratch run, usingXCL_ADAPTER=3080 TiandXCL_REQUIRE_GPU=wave64. Synthetic split-wave64 coverage on wave32 hardware. AI-assisted. Codex (GPT-6, exact variant unavailable) extended the fixture, ran the tests, and drafted this report.@jennydeth on GitHub · 2026-11-25 14:14 UTC · original
Split wave64 run on a 32-lane NVIDIA card (listed under Not tested).
Setup: RTX 3060 12 GB (32-lane waves, driver 32.0.16.2101), Ryzen 5 5600X, 32 GB RAM, Windows 11 build 26300, Rust 1.100.0, DXC 1.9.2609.5, debug build. Head 0f2344c.
Result: cargo test --workspace -- --test-threads=4: 1138 passed, 0 failed, 46 ignored. SKIPPED: 19 GPU tests for no wave64 (expected on this card); the per-lane f16 arithmetic / f16 packed / f32 conversions cases (per-lane form: refused); heap windows; driver cache cannot be disabled.
Not tested: native wave64; a title run.
AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this report.
@DavidM1911 on GitHub · 2026-11-26 06:27 UTC · original
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: 1 failure under parallel scheduling; clean on--test-threads=1rerun (1305 passed, 0 failed, 27 ignored, 79s). Intermittent single-test flake — tracked in #1978.Thanks!
— Devin
@bmjask on GitHub · 2026-11-25 21:42 UTC · original · reviewed
No source-level blocker found. DPP fallback/bridge EXEC handling and inactive-lane semantics look correct; differential GPU coverage is meaningful. Gap: no DPP8 SRC0=0xEA or DPP16 FI=1 case, which takes all_lanes path—add especially for split wave64. Current Windows CI is red from an apparently unrelated pre-existing bridged-mask barrier test; rerun/triage to establish clean merge evidence.
@zhouzhidong3-hash on GitHub · 2026-11-26 06:46 UTC · original
RTX 5070 / current-head synthetic follow-up to the FI coverage suggestion, complementing the earlier RTX 3080 Ti scratch report on
0f2344c.What was checked
Runtime head
f65c9d5b700aa7d8e61c81380c63f02676b30c48plus the test-only scratch fixture below. No implementation edits. Windows 10 Pro 19045, i7-12700KF, NVIDIA GeForce RTX 5070 / 591.86 (adapter identity printed by the fixture), Rust 1.100.0 MSVC debug, DXC/DXIL 1.8.2502.11 and local Agility SDK. ExplicitXCL_ADAPTER=5070,XCL_DIRECT_DXIL=all.The fixture executes both native wave32 and split wave64 on wave32 hardware: HLSL explicitly sets
Options::split_wave64, and the per-lane route callskernel_split, notkernel(..., true). It does not use the checked-in fixture's native-wave64 skip as coverage.With EXEC narrowed to even lanes and
v1 = lane + 1, inactive odd source lanes still hold distinct values. Six DPP adds cover:FI=1, and matchingFI=0/bound=1 control.SRC0=0xEA(FI) and0xE9(non-FI) control.FI=1, bound=0 and bound=1, including each row's invalid first source.Actual results
That is 576 expected output words per backend / 1,152 bitwise CPU checks in total. Both FI-on/off assertions also distinguish the two behaviors. This uses explicit CPU arithmetic and inactive/boundary rules, rather than only comparing the two backends with each other.
Parent control: the identical fixture on official main
08db8020d323bf478964fcc586152cce54959cfcreports0 passed, 1 failed, 0 ignored, 1331 filtered/ exit101. It reaches the wave32 per-lane translation and fails withunsupported V_ADD_F32 (it reads register 126 the per-lane form did not pass). Parent direct GPU dispatch and split64 are not reached; this is a lowering-gap control, not a parent GPU output mismatch.The six instruction pairs were also repacked independently from AMD's RDNA2 ISA tables 76,90-92: raw FI bit50, raw bound bit51, DPP8FI source234. They match the bytes logged by both forms. This was a manual-spec bit check, not an LLVM-MC or native-RDNA execution result.
Head archive SHA256
cc7f85c8428c8ce888ab5db07bc807145aab36af16c34336e580b665768867b6; all four PR-file Git blobs match the GitHub API. After each run the entire original source file was restored byte-for-byte; all 209 Rust-file hashes match the corresponding pristine archive on each tree.Not tested
Native wave64 hardware, a full suite on this head, release-host builds, retail/smoke/gameplay, performance, other DPP patterns/modifiers, and FI inside partial control-flow blocks. One process per tree for the final fixture; earlier development runs are not included in these counts. This is focused scratch coverage, not merge approval.
AI use
OpenAI Codex (GPT-6; exact serving variant unavailable) wrote the test-only fixture/CPU expectations, independently checked instruction fields against the AMD reference, ran the parent/head tests, verified original-source restoration, and prepared this report.
Complete test-only patch on
f65c9d5(no runtime changes)github-bot referenced this pull request2026-11-26 11:17:26 +00:00
@ClosetPie107 on GitHub · 2026-11-26 13:57 UTC · original
AMD RX 9070 (RDNA4, RADV / Linux) test report on
f65c9d5bSetup
experimental-11.0-20261112), DXVKv3.1.1-209, patched vkd3d-protonmaster(ec207194,dxil-spirvb540c8a2), DXC1.9.2609.5x86_64-pc-windows-gnubuildTested
dpptests (XCL_DIRECT_DXIL=1 XCL_PER_LANE=1,xcl-<hash>.exe dpp --test-threads=1,XCL_ADAPTER=9070):707 MiB), including#1845's new GPU testgpu::recomp::lower_dxil::tests::bridged_dpp_agrees_with_hlsl_on_the_gpuandgpu::recomp::tests::gpu_sdwa_dpp_and_cross_lane.lower_dxil::tests(same flags):#1426f16/cvt subcases skipped). The 2 failures are the pre-existing RDNA4/RADV ones (f32_programs_on_the_gpu/f64_programs_on_the_gpu, #472 / #530), unrelated to#1845.Not tested
f65c9d5b, Windows, NVIDIA, retail game run withXCL_PER_LANE=1.AI use
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.