Tests: cover cube coords, V_PERM_B32, legacy FMA, frexp/ldexp, and f16 unary ops #1629
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1639"
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 piyonchu on 2026-11-24T18:31:11Z.
Tests only — adds GPU execution coverage in
crates/xcl/src/gpu/recomp/tests.rsfor previously untested RDNA2 ALU, cube coordinate, permutation, legacy FMA, frexp/ldexp, and unaryf16instructions (5656acd4,82a6fb1f, rebased ontomainfa204595).What is in it
crates/xcl/src/gpu/recomp/tests.rs(5656acd4): addsgpu_cube_coords_perm_and_legacy_fma(V_CUBEID_F32,V_CUBESC_F32,V_CUBETC_F32,V_CUBEMA_F32,V_PERM_B32selectors0..13+,V_FMA_LEGACY_F32/V_FMAC_LEGACY_F32) andgpu_frexp_ldexp_and_unary_f16_ops(V_FREXP_MANT_F32,V_FREXP_EXP_I32_F32,V_FREXP_MANT_F16,V_FREXP_EXP_I16_F16,V_LDEXP_F16,V_FLOOR_F16,V_CEIL_F16,V_TRUNC_F16,V_RNDNE_F16,V_FRACT_F16,V_RCP_F16,V_RSQ_F16,V_SQRT_F16,V_LOG_F16,V_EXP_F16,V_SIN_F16,V_COS_F16).crates/xcl/src/gpu/recomp/tests.rs(82a6fb1f): addsV_PERM_B32selector10(0x0A070502) and swappedSRC0/SRC1zero operands forV_FMA_LEGACY_F32/V_FMAC_LEGACY_F32.Note:
gpu_frexp_ldexp_and_unary_f16_opsscopesfrexpinputs to positive normal/special values (6.0,0.375,0.125,0.0,+inf,NaN) and normal inputs withoutf32subnormals (which flush under SM 6.6).Tested
1.8.2502.11(10.0.26100.0), debug build at commit82a6fb1f1af90dd41a3805c5b05f8a6d8b4ed3eb:cargo test -p xcl --lib gpu_cube_coords_perm_and_legacy_fma -- --nocapture: 1 passed, 0 failed (0.29s).cargo test -p xcl --lib gpu_frexp_ldexp_and_unary_f16_ops -- --nocapture: 1 passed, 0 failed (0.27s).cargo test -p xcl --lib gpu::recomp::tests -- --test-threads=1: 205 passed, 0 failed, 18 ignored (19.74s).python scripts/pr_check.py --localandgit diff --check upstream/main..HEAD: passed.Not tested
cargo test --workspace --test "*" -- --test-threads=1passed the first 24 integration test binaries (303 passed, 0 failed, 22 ignored) before stopping at unrelated failuregpu_two_pass_cache_e2e(two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs), so later integration binaries and non-gpu::recompunit modules were not re-run at this commit.AI use
main, ran the local test suite, and drafted this PR description.Imported from ivall/xcl. Originally posted by Belox17 on 2026-11-24T20:02:51Z.
Test report for
77413a91on NVIDIA (RTX 3060 Ti): both new GPU tests pass and nothing else changesTested
77413a91as is (base9e3831e), clean tree.gpu_cube_coords_perm_and_legacy_fma,gpu_frexp_ldexp_and_unary_f16_ops) withcargo test -p xcl --lib <name>: 2 passed (the GPU part ran on this adapter, noSKIPPED).cargo test --workspace -- --test-threads=4on the head: 778 passed, 0 failed, 41 ignored; its base9e3831eon the same machine: 776 passed, 0 failed, 41 ignored. SKIPPED on both:gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).mainc160d86e(clean merge): 860 passed, 0 failed, 42 ignored;mainalone: 858 passed, 0 failed, 42 ignored, the same three SKIPPED as above.Not tested
AI use: Claude Code (Claude Opus 5.5) ran the commands on this machine and wrote this report from those runs.
Imported from ivall/xcl. Originally posted by mantavisual on 2026-11-24T20:03:08Z.
Test report for
77413a910109ee7abe6ad1a9edaea89d43bd08af.Tested
cargo test -p xcl --lib --locked <name>: both new tests pass.Do the tests notice a broken translator? Two breaks are not noticed:
V_PERM_B32selector 10 reading s0 bit 31 instead of bit 15. The comment lists 8..11, but selector 10 is not used. A case with selector0x0A070502, expecting0x00840243, passes normally and fails with the break.fma_legacyignoring a zero in the second operand. Only the first operand is ever zero. The same case with SRC0 and SRC1 swapped passes normally and fails with the break.Three other breaks were caught.
Not tested: the whole suite, AMD, native wave64, retail title.
AI use: Claude Code (Claude Opus 5.5) ran this on my machine, wrote the report and posted it for me.
Imported from ivall/xcl. Originally posted by piyonchu on 2026-11-24T20:35:32Z.
Thanks for the mutation check on RTX 4060, @mantavisual! Added both missing cases in
gpu_cube_coords_perm_and_legacy_fma:V_PERM_B32with selector0x0A_07_05_02(exercising selector10=s0[bit15]->0x00_84_02_43).V_FMA_LEGACY_F32andV_FMAC_LEGACY_F32withSRC0/SRC1swapped ((+inf) * (+0.0 / -0.0) + c).Re-verified
gpu_cube_coords_perm_and_legacy_fma(1 passed; 0 failed) andgpu_frexp_ldexp_and_unary_f16_ops(1 passed; 0 failed) on RTX 4060.Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T20:56:18Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~22 ignored.Thanks!
Imported from ivall/xcl. Originally posted by malzaharhub-ctrl on 2026-11-24T21:10:32Z.
Independent AMD GPU validation — RX 7900 XTX
Tested PR #1639 at commit
7e55a23943ae5091b80606ea86f9d06bbfcedd4d.Hardware and environment
32.0.32029.2010(18 November 2026)1.100.01.9.2602.17Targeted GPU tests
Both tests were run with
XCL_REQUIRE_GPU=wave64.gpu_cube_coords_perm_and_legacy_fma: 1 passed, 0 failed.gpu_frexp_ldexp_and_unary_f16_ops: 1 passed, 0 failed.Full GPU recompiler test group
Command:
cargo test --locked -p xcl --lib gpu::recomp -- --test-threads=1 --show-outputResult:
This was run with
XCL_REQUIRE_GPU=wave64.Full workspace validation
Ran
scripts/test.ps1using PowerShell with a temporary execution-policy bypass.Result: exit code 0.
One optional GPU test was skipped because the adapter does not support heap windows. No test failures were reported.
The repository working tree remained clean throughout testing. No source changes were made.
I have not tested any game files.
AI assistance disclosure: ChatGPT assisted with interpreting test results and drafting this report. I independently executed the commands and tests on my hardware and verified the results.
Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T02:03:56Z.
CI \Build and test\ and \PR description\ passed on \
8587f4e. With #1617\ now merged at the end ofecomp/tests.rs, please rebase onto \main\ and obtain an AMD GPU pass on the rebased head (earlier RX 7900 XTX pass was on \
7e55a23).Imported from ivall/xcl. Originally posted by piyonchu on 2026-11-25T02:32:10Z.
Rebased onto
main(cbc296a, with#1617merged) at5384af6and re-ran the full GPU/workspace test suite on RTX 4060 Laptop GPU (1156 passed, 0 failed, 46 ignored, both new tests passing in0.38s/0.27s).Updated the PR description with the new head and counts. I do not have AMD GPU hardware locally, so native-wave64 AMD validation on
5384af6remains untested on my end.Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T06:57:31Z.
Tested
Clean detached PR head
5384af6315b1d22fa523442d7f599dc7c92a5f7con STOR-WINLAB. Windows 11 Enterprise Evaluation 25H2 x64 build 26200.9974, Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175, Rust/Cargo 1.100.0 MSVC, DXC/DXIL 1.9.2609.5.cargo test --locked -p xcl --lib --no-runcompleted outside the Arc mutex. The prebuilt executable ran underInvoke-ArcTest.ps1 -Test, withXCL_ADAPTER=A770andXCL_DIRECT_DXIL=0:1 passed, 0 failed, 0 ignored, 0 skipped, 1,125 filtered, 0.45 s. Native and wrapper exits were 0. HLSL/DXC used split wave64. All 704 assertions across 64 logical lanes passed, covering cube ID and projection on all six faces, three byte permutation outputs including selector 10, and legacy FMA/FMAC with signed zero and infinity and with finite inputs in both operand orders.
Not tested
Native wave64, direct DXIL, other fixtures and adapters, workspace suite, and retail smoke.
AI use
T3 Code / Codex (
gpt-6.2-sol) ran the fixture and wrote this report.Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T05:58:15Z.
Re-verification on RTX 3060 Ti (Windows 11): still a merge conflict with current
mainon the new head — needs another rebase before it can be tested.Imported from ivall/xcl. Originally posted by piyonchu on 2026-11-26T09:38:58Z.
@DavidM1911 Thanks for checking —
#1639is already rebased directly onto currentmain(b49be18) ataab2c7f(0commits behindmain), showsMERGEABLE/CLEANon GitHub, and merges cleanly withupstream/main(git merge-tree --write-treeclean,Build and testandPR descriptionpassing). Could your test runner be using a cached ref before fetchingaab2c7f?Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T10:17:35Z.
AMD RX 6800M retest of PR head
aab2c7fcb14f3a92ae1566c7c9db291814d51872(rebased onmainb49be1836844fe0b0cdb3211dce3cb7fb4e21ac7)Tested
XCL_ADAPTER=6800MandXCL_REQUIRE_GPU=wave64, rancargo test --locked -p xcl --lib -- gpu_cube_coords_perm_and_legacy_fma gpu_frexp_ldexp_and_unary_f16_ops gpu_bench_really_runs --test-threads=1 --show-output.GPU: AMD Radeon RX 6800M; there was noSKIPPEDmarker. The runner's explicit adapter selector and required GPU setting prevent a silent fallback on these fixtures.Not tested
Codex with GPT-6.2 Sol ran the test; Codex with GPT-6.2 Astra checked the exact head, log, and report before posting.
Imported from ivall/xcl. Originally posted by piyonchu on 2026-11-29T01:19:40Z.
Rebased onto latest
main(fa204595, head82a6fb1f) resolving the conflict at the end ofcrates/xcl/src/gpu/recomp/tests.rs.Verified locally after rebase on RTX 4060 Laptop GPU (
Windows 11, debug):cargo test -p xcl --lib gpu_cube_coords_perm_and_legacy_fma -- --nocapture: 1 passed, 0 failed (0.29s)cargo test -p xcl --lib gpu_frexp_ldexp_and_unary_f16_ops -- --nocapture: 1 passed, 0 failed (0.27s)cargo test -p xcl --lib gpu::recomp::tests -- --test-threads=1: 205 passed, 0 failed, 18 ignored (19.74s)python scripts/pr_check.py --local:description ok;git diff --check upstream/main..HEAD: cleanImported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:22:06Z.
Triage (#1607) – head
82a6fb1Part of
gpu_frexp_ldexp_and_unary_f16_opsrepeats #1227, opened earlier: the same v_ceil/floor/trunc/rndne/fract_f16, v_frexp_mant/exp f32 and f16, and v_ldexp_f16 checks, which #1227 runs in VOP3 form on both wave sizes. V_PERM_B32 is also covered by #445 and #1057. The cube ops, legacy FMA/FMAC and the f16 rcp/rsq/sqrt/log/exp/sin/cos checks are not tested anywhere else.The comment "negative/subnormal frexp_mant currently depends on raw HLSL frexp()" is out of date: #587 (merged) keeps the sign. Both tests run wave64 only (
for l in 0..64,run_program). I checked the perm selector and cube face expectations by hand, and they match the RDNA2 definitions.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.