Recompiler tests: GPU checks for f32 ceil/trunc/rndne, f32/i32 min/max #739
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!739
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-739"
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?
@13hourstilliland on GitHub · 2026-11-24 04:21 UTC · original
13hourstilliland:recomp-tests-round-min-max→main· +100 −0 · 1 files · 1 commits · openAdds a GPU test for nine RDNA2 instructions that
emit.rstranslates but no test runs:v_ceil_f32,v_trunc_f32,v_rndne_f32,v_max_f32,v_min_f32,v_max3_f32,v_min3_f32,v_max_i32andv_min_i32. Test only, no runtime change.What is in it
gpu_valu_round_and_min_max_f32_i32incrates/xcl/src/gpu/recomp/tests.rs, afterf32_compares_with_nan(away from the lines open PRs add to): one kernel with all 9 instructions, run as wave64 where the adapter has it and as wave32 everywhere (gpu_waves), 32 batches of operands: edge values (±0, ±0.5, ±1.5, ±2.5, 0.49999997, ±8388607.5, ±1e30, ±inf, NaN), values on 1/256 steps up to 2^23 and random bit patterns, with denormals flushed to a signed zero and NaNs quieted, each lane compared with the RDNA2 definition computed on the CPU: rounding keeps the sign of a zero; a quiet NaN operand of an f32 min/max gives the other operand (minNum/maxNum), and min/max zero results are compared without their sign.3db536e(before the rebase onto main91f9a5e; the test code did not change): with the reference changed (referenceround_ties_evenreplaced byround:wave32, 188 wrong (V_RNDNE_F32: 188), no other instruction) the test fails; with ceil as floor, trunc as round, rndne as trunc, max and min swapped, max3 and min3 with the inner op swapped, signed i32 min and max made unsigned applied toemit.rsall at once it fails and names every instruction (wave32, 5199 wrong (V_CEIL_F32: 634, V_TRUNC_F32: 217, V_RNDNE_F32: 217, V_MAX_F32: 956, V_MIN_F32: 956, V_MAX3_F32: 628, V_MIN3_F32: 629, V_MAX_I32: 481, V_MIN_I32: 481), 217 to 956 wrong per instruction). Those edits are not in the PR.v_min_f32also appears in the open #247, inside an image-sample test; that PR does not test it on its own.Tested
stable-x86_64-pc-windows-gnu(MinGW linker), DXC 1.9.2609.5, debug build, commit586edbac69(on main91f9a5e9f0)cargo test --workspace --no-fail-fast -- --test-threads=4, run in the interactive desktop session: 693 passed, 0 failed, 41 ignored (lib: 653 passed, 0 failed, 21 ignored;e2e3 of 3;gpu_valu_round_and_min_max_f32_i32ok).main91f9a5e9f0on the same machine: 692 passed, 0 failed, 41 ignored (lib: 652 passed, 0 failed, 21 ignored)SKIPPED(no wave64 on this GPU):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardwareNot tested
stable-x86_64-pc-windows-msvc): built with the GNU toolchain only.crates/xcl/srcruntime file changes).gpu_typed_buffer_loads_and_stores,gpu_uma_import_check_at_init,gpu_valu_16_and_64_bitand this test) and were killed. The same four tests together passed twice, the lib suite alone passed 4 of 4,mainpassed 4 of 4, and the full-suite run counted above passed. I did not find the cause.AI use
@MesshM on GitHub · 2026-11-24 04:39 UTC · original
Test run of
586edbac69ebec057acaa9927957683036958dceon AMD RDNA4. I merged it onto currentmain64b3f35locally (clean merge) and tested that tree.Tested
stable-x86_64-pc-windows-msvc, debugcargo build --workspace+cargo test --workspace -- --test-threads=4on the merge: 702 passed, 0 failed, 41 ignored, exit code 0;xcllib tests 661 passed, 0 failed, 21 ignoredSKIPPED; the new rounding / min-max GPU test passes.Review: Overlap:
v_ceil_f32,v_trunc_f32andv_rndne_f32are also covered by #655 (gpu_float_rounding_ops), andv_min_f32/v_max_f32by #719; new here arev_max3_f32,v_min3_f32and the i32 min / max. If those land first, this could keep only the new ones. The references are right (ceil(−0.5) = −0, min / max zero results compared without the sign, as D3D allows).Not tested: no retail title or regression run (I have no unpacked game), no
XCL_SAMPLE_*tests, release build; the PR's head on its old base was not run, only its merge ontomain.Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
@futurepro62 on GitHub · 2026-11-24 04:46 UTC · original
An NVIDIA run, since the report above is on RDNA4 (native wave64). Tested exact head
586edba(on its base91f9a5e).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 693 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.gpu::recomp::tests::gpu_valu_round_and_min_max_f32_i32 ... ok.Not tested
AI use
@ItsMrDubey on GitHub · 2026-11-24 04:57 UTC · original
Test report for
586edbac69ebec057acaa9927957683036958dce(this PR's head)Tested
stable-x86_64-pc-windows-msvc), debug; DXC 1.9.2602.17 from Windows SDK 10.0.2610016 test binaries: 692 passed, 1 failed, 41 ignored. Same machine,
main64b3f3559: 700 passed, 1 failed, 41 ignored.This PR's tests:
gpu::recomp::tests::gpu_valu_round_and_min_max_f32_i32: okFailures:
hle::kernelx::tests::xmem_virtual_query_marks_cpu_readable_memoryfails on this machine on every run, on this PR's head and onmain64b3f3559alike (5 of 5 reruns onmain), so it is not from this PR. #650 fixes it here.16 test binaries instead of
main's 17 because this branch predatestests/sparse_reinit.rs; nothing crashed.SKIPPED (no wave64 on this GPU):
gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.AI use: Claude Code (Claude Opus 5.5) ran the builds and tests and wrote this report from their output.
@JJAutoCompare on GitHub · 2026-11-25 06:03 UTC · original
Empirical test report (
586edbac)Verified PR #739 at commit
586edbac69ebec057acaa9927957683036958dcein a clean detached checkout.Hardware / environment
XCL_ADAPTER=A770, on Windows x64 build 26200 with an AMD Family 23 Model 113 CPU.1.100.0 (0ef1bc386 2026-11-09). The test ran in the unoptimized Cargo test profile with incremental compilation and debug info disabled.1.9.2609.5(01b62ad47indxc.exe --version). The fixture reported loadingdxcompileranddxilversion1.9.2609.5.Commands and results
cargo test -p xcl --lib --no-runcompleted with exit code 0 before acquiring the GPU lock.Invoke-ArcTest.ps1, withRUST_TEST_NOCAPTURE=1, ranxcl-00e28da3621caf64.exe gpu::recomp::tests::gpu_valu_round_and_min_max_f32_i32 --exact --nocapture --test-threads=1using the executable from that build. Exit code 0. The log showed 1 passed, 0 failed, 0 ignored, 0 skipped and 673 filtered out. The fixture completed in 0.73 seconds.Observed behavior
The fixture compiled its recompiled shader with DXC and completed its GPU comparisons against the CPU reference. It checked nine VOP3 instructions over 32 batches per executed wave mode. Coverage included f32 ceil, truncation and nearest-even rounding, two- and three-operand f32 min/max, and signed i32 min/max. The fixture checked signed zero for rounding and numeric results for min/max with a single quiet NaN. The result confirms wave32 coverage. The log does not enumerate the wave modes, so native wave64 coverage was not established by this run.
Not tested
The full GPU workspace suite and game smoke runs were omitted. No other GPU was tested.
AI use
Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against
pr739-focused.logand published.@DavidM1911 on GitHub · 2026-11-25 11:28 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
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.