Tests: image instructions in the per-lane lowering and on the GPU #1825
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!1825
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1825"
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?
@MiguelMachado-dev on GitHub · 2026-11-24 21:28 UTC · original
MiguelMachado-dev:recomp/per-lane-mimg-tests→main· +428 −3 · 4 files · 2 commits · draftStacked on #1797; only the top commit (
434f428) belongs here. The commit under it,c2b0c00, is #1797's8ec49c0cherry-picked ontomainc4d37bewith the same diff. Once #1797 is inmain, this PR is rebased and only the tests remain.These are tests for image instructions in the per-lane form (#1745), the MIMG follow-up listed on #1269. They need #1797: without its
vgpr_useschange, the per-lane form refuses every image instruction with NSA addresses, and the threelower_dxiltests fail. Part of #1269.What is in it
Tests: image instructions in the per-lane lowering and on the GPU(434f428). Tests only, in the files'#[cfg(test)]modules, +271/−1:crates/xcl/src/gpu/recomp/lower.rs:decode_bytes,mimg(an image instruction with NSA dwords) andimage_program;image_instructions_in_coalesced_runs_and_whole_quads: image instructions join a coalesced guarded run. An implicit-LODIMAGE_SAMPLEstays out of the run, and a PS refuses it in a block that not every lane reaches.crates/xcl/src/gpu/recomp/lower_dxil.rs:image_instructions_pass_every_register_they_use(CPU): everyIMAGE_*instruction, over DIM, A16, D16, DMASK, GLC and sequential or 11 scattered NSA addresses, gets through the per-lane compute lowering with no register missing from the bridge.per_lane_image_instructions_agree_with_the_hlsl_path_on_the_gpu:SAMPLE_L, resinfo,GATHER4_LZ, and GLC compare-swap and add.a_per_lane_bvh_with_nsa_addresses_runs_on_the_gpu: a BVH ray with NSA addresses gives the same memory with four memory windows, with one window, and on the HLSL path.Tested
Setup:
cargo build --workspace && cargo test --workspace -- --test-threads=4:434f428: 965 passed, 0 failed, 43 ignored (lib: 916 / 0 / 23);mainc4d37be: 959 passed, 0 failed, 43 ignored (lib: 910 / 0 / 23).By module at
434f428, 0 failed in each:gpu::dxil::gpu::recomp::lower::gpu::recomp::lower_dxil::gpu::recomp::lane_masks::gpu::rdna2::SKIPPED GPU tests: 23 lines, the same on both runs, and none in the new tests.
V_MUL_F16,V_PK_MUL_F16andV_CVT_F16_F32, whose #1426 semantics differ from the console's.heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).shaders::tests::pso_measurement_compiles_an_exact_synthetic_record: it cannot disable the driver cache, which needs Windows Developer Mode.The three
lower_dxiltests fail without #1797's change. I checked that on #1745's branch at3ca3633, before it was merged.Regression run
crates/xcl/srcthatpr_check.pycounts as runtime, and until #1797 is merged the diff also has #1797's commit.mainand this PR is rebased, the diff is test-only. It can then take thetest-onlylabel after review, or a smoke pair.Not tested
AI use
@upipibi on GitHub · 2026-11-24 21:37 UTC · original
Same results on Ampere: RTX 3070 8 GB (32-lane waves, no wave64), driver 616.56, Windows 11, debug,
434f428onmainc4d37be:image_instructions_in_coalesced_runs_and_whole_quads,image_instructions_pass_every_register_they_use,per_lane_image_instructions_agree_with_the_hlsl_path_on_the_gpu,a_per_lane_bvh_with_nsa_addresses_runs_on_the_gpu).gpu::dxil::84 passed, 1 ignored;gpu::recomp::lower::35 passed;gpu::recomp::lower_dxil::15 passed; 0 failed in each (--test-threads=4).The whole workspace was not run.
AI-assisted (Claude Code). Synthetic tests only.
@DavidM1911 on GitHub · 2026-11-25 00:50 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!
@Chrysana on GitHub · 2026-11-25 19:31 UTC · original
AMD run of
434f428, for "Wave64, AMD and heap windows" under Not tested. The four new tests pass on an RX 9070 XT (RDNA4) and on an RDNA2 iGPU, and the suite matches your RTX 5080 counts exactly: 965 / 0 / 43 on this head, 959 / 0 / 43 onc4d37be. One limit on what this covers: both GPU tests run their programs as wave32 (kernel(&insts, false),wave64: false), andimage_programis wave32 code (S_AND_SAVEEXEC_B32). So on wave64 hardware they still run 32 lanes, and wave64 stays untested by these tests on any GPU.Setup: AMD Radeon RX 9070 XT 16 GB (RDNA4, wave64), driver 32.0.32015.2008; Ryzen 7 9800X3D, whose Radeon iGPU is RDNA2 (
XCL_ADAPTER=1); Windows 11 26200.9974, rustc 1.100.0 MSVC, debug. Head as pushed (434f428, with #1797's commit under it), and its basec4d37be, each in its own checkout and target folder.Full suite (RX 9070 XT,
cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4):434f428c4d37beV_MUL_F16/V_PK_MUL_F16/V_CVT_F16_F32refusals (at wave32 and at wave64). The other 2 areheap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows here either) andpso_measurement_compiles_an_exact_synthetic_record(no Developer Mode).The new tests and your module table, on each GPU (
cargo test -p xcl --lib -- --test-threads=4 <filter>):image_instructions_in_coalesced_runs_and_whole_quadsimage_instructions_pass_every_register_they_useper_lane_image_instructions_agree_with_the_hlsl_path_on_the_gpua_per_lane_bvh_with_nsa_addresses_runs_on_the_gpugpu::dxil::gpu::recomp::lower::gpu::recomp::lower_dxil::gpu::recomp::lane_masks::gpu::rdna2::0 failed everywhere. So AMD's drivers give the HLSL path's registers and textures for the NSA and sequential loads, the samples (including D16 and
SAMPLE_L), resinfo,GATHER4_LZ, the GLC compare-swap and add, and the BVH ray with four memory windows and with one.On wave64: making the GPU test cover it would take a wave64 form of
image_program(S_AND_SAVEEXEC_B64, a 64-bit compare mask, EXEC high set) and 64-lane texture layouts (the 8×4 compare-swap and add targets hold 32 texels). That's more than a flag, so I didn't make a local variant. If you add one, I can run it on this card.Not tested
main: it conflicts incrates/xcl/src/gpu/dxil/lower_image.rs, so these runs are on the head as pushed.AI use
github-bot referenced this pull request2026-11-26 06:18:31 +00:00
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.