Tests: cover upper_lanes hazards, CFG jumps, VALU ops, and MIMG DMASK #1508
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1518"
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 amazedturnip on 2026-11-24T17:11:31Z.
Add an integration test suite (
crates/xcl/tests/upper_lanes_contract.rs) covering previously untested public APIs (UpperLanes::hazards,UpperLanes::resolved,upper_lanes::slot) and analysis paths incrates/xcl/src/gpu/recomp/upper_lanes.rs. The 5 tests verifyDS_PERMUTE_B32vsDS_BPERMUTE_B32, indirect jumps vs fetch-shaderS_SWAPPC_B64and resolvedfar_targetjumps, binary VALU ops with absorbing constants and VOP3 modifier bailouts, DPP16 partialROW_MASK/BANK_MASK,S_MOVRELD_B32, SGPR-laneV_WRITELANE_B32, MIMGDMASK/D16/TFEtruncation, and empty/unreachable code.What is in it
crates/xcl/tests/upper_lanes_contract.rs: add 5 integration tests coveringupper_lanes::slot,UpperLanes::hazards/UpperLanes::resolvedandDS_PERMUTE_B32vsDS_BPERMUTE_B32, indirect jumps vs fetch-shaderS_SWAPPC_B64and resolvedfar_targetjumps, binary VALU ops / absorbing constants / VOP3 modifier bailout / DPP16 partialROW_MASKandBANK_MASK, andS_MOVRELD_B32/ SGPR-laneV_WRITELANE_B32/ MIMGDMASK/D16/TFEtruncation / empty and unreachable code.Tested
AMD Radeon(TM) Graphics (driver 32.0.21043.19003, DXC 1.9.2609, native wave64),XCL_ADAPTER=radeon):cargo test --workspace -- --test-threads=2— 775 passed, 0 failed, 41 ignored (SKIPPED GPU tests: none)Not tested
AI use
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T18:53:57Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
Imported from ivall/xcl. Originally posted by Decodere on 2026-11-27T11:58:27Z.
Independent desktop NVIDIA verification of PR #1518 at head
6e3795d7090b74de65a7992d2b8e5f00490c3295(1commit; exact parent & merge-base:9e3831e1f570d3646e53ab753b19ec07eb8f1485, pre-#2555ancestor ofmain).Environment
7956 MiBreported by D3D12, Wave32-only Ada), driver32.0.16.2114(NVIDIA621.14, WDDM 3.2)31.9 GiBusable), Windows 11 Home26200(Developer Mode off)rustc 1.100.0 (0ef1bc386 2026-11-09)MSVC, DXC1.9.2609.5,--releaseTargeted tests & build (
6e3795d7)cargo test --release -p xcl --test upper_lanes_contract -- --nocapture(3 consecutive runs)5 passed; 0 failed; 0 ignored; 0 filtered out× 3 (0.00s,0.00s,0.00s,0skipped;slot_extracts_constant_lanes_and_rejects_sgpr_or_other_insts,hazards_and_resolved_classify_all_read_kinds_and_ds_permute,cfg_indirect_jumps_vs_fetch_swappc_and_resolved_far_jump,binary_valu_ops_absorbing_constants_vop3_modifiers_and_dpp16_masks,movreld_sgpr_writelane_mimg_dmask_and_unreachable_code)cargo build --release -p xcl1.33sincremental--testcompile +0.06sincremental--releasebuild, exit0,0new warnings)Paired quiet 60 s retail smoke (
title: 29640639)(Note:
scripts/smoke.ps1at9e3831e1predates9683e7a6and printed the local folder basename ontitle:; replaced below with the standard9683e7a6title hash29640639, with all measured fields verbatim.)Exact parent & merge-base (
9e3831e1f570d3646e53ab753b19ec07eb8f1485):PR #1518 (
6e3795d7090b74de65a7992d2b8e5f00490c3295):Limits of coverage
crates/xcl/tests/upper_lanes_contract.rs,0production-code changes); all5/5CPU-sideupper_lanescontract tests passed3/3(0skipped).AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:59:10Z.
Triage (#1607) – head
6e3795dNo open or merged PR adds the same tests. Several open PRs change upper_lanes.rs (e.g. #917, #927, #1022, #1616) and may change behaviour these assertions pin; main only changed two helpers to pub(super) since this PR's base, so the API it uses is unchanged.
The tests exercise only public items of gpu::recomp::upper_lanes; CONTRIBUTING puts unit tests in the module's own tests block, which is where this would usually go.
Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Imported from ivall/xcl. Originally posted by grathepic on 2026-12-03T00:20:11Z.
merge-check
078358a0586e3795d709git diff --checkexit 0)cargo +1.98.1-x86_64-pc-windows-msvc build --offline --locked --workspace— exit 0 (36 pre-existing warnings inxcllib)cargo +1.98.1-x86_64-pc-windows-msvc test --offline --locked --workspace --no-fail-fast -- --test-threads=4(withXCL_DXC_DIR=C:\VulkanSDK\1.4.363.0\Bin) — 3010 passed, 1 failed, 52 ignored across 45 harnesses; 27 SKIPPED (22 no wave64, 2 no heap windows, 1 no GPU_UPLOAD heaps, 1 no dxil.dll, 1 cannot disable the driver cache (Windows Developer Mode required)). Intests\upper_lanes_contract.rs: 4 passed, 1 failed —movreld_sgpr_writelane_mimg_dmask_and_unreachable_codepanicked atcrates/xcl/tests/upper_lanes_contract.rs:351(assertion left == right failed: left: Some(Shadow), right: None).crates/xcl/tests/upper_lanes_contract.rswith zero production code or dependency changes)origin/mainactually exposes a regression introduced after this PR's base9e3831e1: commit43c56dceaddedmimg_vgpr_usesincrates/xcl/src/gpu/rdna2.rs:613-684, which computesn_datafromDMASK/D16without adding((f("TFE") | f("LWE")) & 1). As a result,IMAGE_LOADwithDMASK=0x1, TFE=1(VDATA=24) returnsw = [24]fromrdna2::vgpr_uses, leavingv25's shadow intact even thoughupper_lanes::vgpr_writes(upper_lanes.rs:548) expectsTFE/LWEto add one written VGPR. Because this test fails on currentorigin/main,#1518cannot merge untilmimg_vgpr_usesaccounts forTFE/LWE. Non-blocking style note: per CONTRIBUTING, unit tests ofupper_laneswould normally live incrates/xcl/src/gpu/recomp/upper_lanes.rs's#[cfg(test)] mod testsrather than a separate integration test binary.movreld_sgpr_writelane_mimg_dmask_and_unreachable_codefails on currentorigin/main(078358a0) because commit43c56dceomittedTFE/LWEfromrdna2::mimg_vgpr_uses; needs a fix onmain(or stacking on one) before mergingView 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.