Tests: cover the v_fma_mix family's halves, modifiers and clamp #1560
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1570"
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 Rj45n on 2026-11-24T17:46:10Z.
Superseded by #1122, which came first and covers more. I wrote this before seeing that PR;
it also exercises SGPR operands, both wave32 and wave64, the dynamic
S_ROUND_MODErounding andchained
mixlo+mixhi, none of which are here. I ran #1122 on an RTX 5070 Ti and it catches eightdeliberate
emit.rsregressions out of eight (report in that thread). Close this one in its favour.The only thing this test reaches that #1122 does not:
NEG = 0b111andNEG_HI = 0b111, themodifiers set on all three sources at once. If that is worth having, it belongs as two encodings
added to #1122, not as a second test.
What is in it
crates/xcl/src/gpu/recomp/tests.rs:gpu_fma_mix_halves_modifiers_clamp_and_preserved_half,12 encodings on each of the three MIX opcodes against a CPU reference —
OP_SEL_HI,OP_SEL,OP_SELon a non-f16 source (ignored),NEG,NEG_HI(which isabshere, applied beforeNEG),CLAMPabove 1 and below 0, and the untouched half of the destination.Tested
stable-x86_64-pc-windows-msvc, DXC 1.9.2602.17, debug. No game data.cargo test --workspace --no-fail-fast -- --test-threads=4: 752 passed, 0 failed, 41 ignoredover 18 test binaries.
SKIPPED, 2, both "no wave64":gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.emit.rs(NEG/NEG_HI swapped; NEG_HI not doingabs; abs after neg; OP_SEL taking the other half; OP_SEL_HI ignored; MIXLO writing the high half;
the other half not preserved; CLAMP ignored) are each caught.
emit.rsis unchanged here.Not tested
scripts/smoke.ps1; the diff touches onlytests.rs, whichpr_check.pyexempts.AI use
this description. I checked the diff and every count against the logs.
Imported from ivall/xcl. Originally posted by DarkPanda69 on 2026-11-24T18:11:42Z.
AMD run with 64-lane waves, which this PR lists as not tested.
Tested: pass, head
f6a575bapplied on its basemain9e3831e, debug, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X, DXC 1.9.2602.17.cargo test -p xcl --lib -- gpu::recomp --test-threads=4:gpu_fma_mix_halves_modifiers_clamp_and_preserved_halfok.Not tested: release profile; Intel; 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-24T19:41:30Z.
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 github-actions[bot] on 2026-11-28T08:00:43Z.
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 Foniass on 2026-12-01T06:09:02Z.
Triage (#1607) – head
f6a575bNo open PR adds the same tests; #1122 (closed, not merged) tested the same v_fma_mix family, and main only exercises V_FMA_MIX_F32 / V_FMA_MIXLO_F16 incidentally, with no V_FMA_MIXHI_F16 test.
The CPU reference matches the ISA (NEG_HI is abs for this family, OP_SEL ignored on f32 sources, MIXLO/MIXHI keep the other half), and the operands are exact in f16 so the expectations do not depend on rounding.
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-02T23:45:12Z.
merge-check
078358a058f6a575beafgit 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) — 3007 passed, 0 failed, 52 ignored across 44 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)). New GPU testgpu::recomp::tests::gpu_fma_mix_halves_modifiers_clamp_and_preserved_halfran and passed with 0 skips.crates/xcl/src/gpu/recomp/tests.rswith zero production code or dependency changes)+101/-0), placed ingpu::recomp::testsand guarded withgpu_ready(). Tests 12ENC_VOP3Pcombinations acrossV_FMA_MIX_F32,V_FMA_MIXLO_F16, andV_FMA_MIXHI_F16with exact dyadic f16/f32 operands: verifiesOP_SEL_HI/OP_SEL_HI_2,OP_SEL(including ignored on f32),NEG_HIasabsbeforeNEG,CLAMP(interior, >1, and <0 cases), and preservation of the untouched destination half (0xA5A5_5A5Asentinel). Disjoint VGPR allocations (v1..v6inputs,v16..v59outputs). Note: the PR body's opening line mentions#1122, which was closed unmerged; per #1607 triage, no other open PR coversV_FMA_MIXHI_F16/ this family.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.