Tests: check per-lane Direct DXIL wave, mask, and far-jump parity on GPU #1833
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1843"
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 microwave805 on 2026-11-24T21:42:50Z.
Add GPU parity and API tests for the per-lane Direct DXIL backend (
recomp::lower_dxil) covering features that previously had only CPU-interpreter or no direct tests (S_WQM,S_CSELECT, scalar carry/borrow chains, far jumps,compute_code,compute_split, andsurvey_compute_code).What is in it
crates/xcl/tests/gpu_per_lane_parity.rs:per_lane_wqm_and_cselect_match_hlsl_on_gpu: validates and runsS_WQM_B32+S_CSELECT_B32+V_CNDMASK_B32(wave32 vialower_dxil::kernel) andS_WQM_B64+S_CSELECT_B64+V_CNDMASK_B32across both 32-lane halves (split wave64 vialower_dxil::kernel_split), comparing every SGPR/VGPR against the HLSL+DXC path.per_lane_scalar_carry_borrow_and_far_jump_match_hlsl_on_gpu: validates and runs chainedS_ADD_U32/S_ADDC_U32+S_SUB_U32/S_SUBB_U32and a far jump (S_GETPC_B64+S_ADD_U32+S_ADDC_U32+S_SETPC_B64) in both wave32 and split wave64 against HLSL+DXC.per_lane_compute_code_split_and_survey: checkslower_dxil::survey_compute_codeon valid and undecodable bytes, then validates and dispatches a compute shader with a far jump throughlower_dxil::compute_code(wave32) andlower_dxil::compute_split(split wave64, cross-checked against HLSL+DXC).Tested
stable-x86_64-pc-windows-msvc, debug)af24810(based onmainc4d37be):cargo test -p xcl --test gpu_per_lane_parity -- --nocapture: 3 passed, 0 failed, 0 ignored (0 skipped).\scripts\test.ps1(cargo build --workspace && cargo test --workspace -- --test-threads=4): 962 passed, 0 failed, 43 ignoredgpu_per_lane_parity): 18×no wave64(lower::tests,lower_dxil::tests,recomp::tests), 3×per-lane form: refused(lower_dxil::tests:f16 arithmetic,f16 packed,f32 conversions), 1×no heap windows(heap_window_out_of_memory_falls_back_to_the_switch_form), 1×cannot disable the driver cache(shaders::tests::pso_measurement_compiles_an_exact_synthetic_record)Regression run
crates/xcl/tests/gpu_per_lane_parity.rs(no runtime or build-input files changed).Not tested
AI use
crates/xcl/src/gpu/recomp/lower.rsandlower_dxil.rs, wrotecrates/xcl/tests/gpu_per_lane_parity.rsand this PR description, and ran the verification commands above.Imported from ivall/xcl. Originally posted by DarkPanda69 on 2026-11-24T22:40:39Z.
AMD run with native 64-lane waves, which this PR lists as not tested, plus an NVIDIA one.
Tested: pass, head
af24810applied onmain689f2db, debug, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X, DXC 1.9.2602.17.cargo test -p xcl --test gpu_per_lane_parity -- --test-threads=4withXCL_ADAPTERset to each GPU:cargo test -p xcl --lib -- gpu::recomp --test-threads=4with this PR applied: 261 passed, 0 failed, 18 ignored on both; the SKIPPED lines are the same as onmain.Not tested: Intel; Linux / Wine; the whole workspace suite.
AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T01:15:29Z.
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!
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T03:21:15Z.
Tested
On PR #1843 head
af2481013ed9d2a09ce778a71cf8200b2e887838in a clean detached checkout on STOR-WINLAB. Intel Arc A770 (driver 32.0.101.9175), Ryzen 7 3800X, Windows 11 Enterprise Evaluation 26200.9974, Rust and Cargo 1.100.0 (x86_64-pc-windows-msvc, unoptimized test profile), DXC and DXIL 1.9.2609.5.Built with
cargo test -p xcl --locked --test gpu_per_lane_parity --no-run. WithXCL_ADAPTER=A770, ran the generated binary serially under the Arc lock:2 passed, 0 failed, 0 ignored, 0 explicit GPU skips. Each test passed its Direct DXIL vs. HLSL+DXC register comparisons and expected-value assertions in both modes.
Not tested
Native hardware wave64, other adapters, the compute/survey fixture (including undecodable input), parallel test execution, the full workspace suite, retail titles, and Linux/Wine.
AI use
T3 Code / Codex (gpt-6.2-sol) ran the checked-in tests and wrote this report.
mainreaches on Windows; the obstacle is replaced vtables — proposal: proxies #172Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-28T08:02:20Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by BBareth on 2026-11-30T19:41:06Z.
merge-check claim
head:
af2481013eImported from ivall/xcl. Originally posted by BBareth on 2026-11-30T19:47:50Z.
merge-check
base:
ff0c364b3dhead:
af2481013emerge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2892 passed, 0 failed, 51 ignored; 28 SKIPPED lines, as on the base; failing: none. The base alone, run earlier today on the same commit: 2888 passed, 1 failed, 51 ignored, 28 SKIPPED lines; its one failure,
hle::d3d12x::pso_async::used_tests::emission_resolves_the_retained_recipe_after_title_address_reuse, passed here and in ten other merged runs today, so it is intermittent on the base. The three new tests ran on the GPU and passed:per_lane_wqm_and_cselect_match_hlsl_on_gpu,per_lane_scalar_carry_borrow_and_far_jump_match_hlsl_on_gpu,per_lane_compute_code_split_and_survey.review: no blocking finding; test-only, one new integration test file, every line read. Each kernel is lowered by
lower_dxil(wave32 and split wave64), validated, run on the GPU and compared register for register with the HLSL + DXC result, then against fixed expected values (WQM quads of lanes 5 and 37, a carry / borrow chain, a far jump over four overwritten moves, a compute program storing tid + 10). It skips withskip_testwithout wave32 or DXC. One note, not blocking:per_lane_compute_code_split_and_surveycallscompute_code,compute_splitandsurvey_compute_codebefore the GPU check, so those three run (and can fail) on a machine without a GPU too; they are pure translation, so that looks intended. No runtime code changes.performance: none: tests only.
verdict: safe to merge
hardware / tool and model: RTX 5070 Ti 16 GB, driver 621.24 (32.0.16.2124); i7-12700K; Windows 11 26200. Claude Code, Claude Fable 5.2 read the diff, ran the build and the suite and wrote this check.
Imported from ivall/xcl. Originally posted by saintwolf on 2026-11-30T20:07:05Z.
merge-check claim
head:
af2481013eImported from ivall/xcl. Originally posted by saintwolf on 2026-11-30T20:13:03Z.
merge-check
base:
ff0c364b3dhead:
af2481013emerge: clean (trial merge 6f627873aecbdd69f7606e38860eb32371b3c9a2; git diff --check clean; +258/-0, one new file crates/xcl/tests/gpu_per_lane_parity.rs)
build: cargo build --workspace -> ok (39 lib warnings, all pre-existing; none from the new file)
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2892 passed, 0 failed, 51 ignored (base
ff0c364bis 2889 + 3 new tests). SKIPPED: 27, the standard set for this card. The three new tests ran on the GPU here (wave32 + split wave64, with the DXC cross-checks) and all passed, matching BBareth's run.review: no blocking finding; test-only, one new integration test file, every line read. Each test assembles a console program with the existing rdna2 encode/decode scaffolding, lowers it through the direct per-lane backend (lower_dxil::kernel / kernel_split / compute_code / compute_split / survey_compute_code), validates the DXIL, runs it on the GPU, and compares register-for-register against the HLSL+DXC translation of the same program, plus pinned expected values that I re-derived against the codebase's own conventions: s128+n is the literal constant n (lower.rs code32: 128..=192 => c(code-128)), so s133/s135/s138 are 5/7/10 and s128/s129 are 0/1 - the carry/borrow pin (s1,s2,s5)=(0,1,-1), (s3,s4,s6)=(-1,3,4) and the WQM pin (s2,s3)=(5,7) fall out exactly; V_LSHLREV is value << amount (lower_valu.rs:765, matching emit.rs); the compute test's v0 = tid in group (the translate_compute doc) and GLOBAL addresses are byte offsets, so mem[tid] = tid + 10 - the same stride pattern robustness_tests.rs:196 pins as tid*4 bytes. The VOP3 mask operand codes used (0/1/4 = s0/s1/s4 register masks, 125 = NULL, 149 = inline 0x15) match the conventions of the existing lower_dxil tests. The far-jump test pins the jump landing (s2, s3) = (40, 0) with v1 = 7 for every lane, i.e. the four overwritten moves are skipped. Correct skip convention (skip_test without wave32 or DXC); one note, not blocking, as BBareth made: per_lane_compute_code_split_and_survey runs compute_code / compute_split / survey_compute_code before the GPU gate, so those pure-translation steps run (and can fail) on a machine without a GPU - consistent with the sibling parity PRs. The survey negative case (four 0xFF bytes must produce a refusal) is a real check, not a formality. Thread: DarkPanda69 ran the author's "not tested" case (AMD native 64-lane waves) plus NVIDIA, passed; DavidM1911 lib all-pass; JJAutoCompare full suite on Intel Arc; BBareth's safe check (2892/0/51; his base-alone run noted the intermittent pso_async emission flake, which did not appear in my merged run).
performance: none: tests only, no runtime code changes.
verdict: safe to merge
hardware / tool and model: RTX 4070 SUPER (driver 32.0.16.2140), Ryzen 7 7800X3D, Windows 11 build 26300, Rust 1.100.0 / OpenCode, Qwen 3.8 27B
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:58:00Z.
Triage (#1607) – head
af24810No open or merged PR adds these per-lane (
recomp::lower_dxil) parity tests: the open parity suites (#2091, #2089, #1778) drivegpu::dxil::kernel, the per-instruction backend, not the per-lanekernel/kernel_split/compute_code/compute_split/survey_compute_codeentry points used here. The test file only uses public APIs that exist on main, and GPU paths skip throughrunner::skip_test. No problems found in the diff.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.