Tests: check 64-bit shifts, v_mad_i64_i32 and f64 fma/min/max on the GPU #682
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!682
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-682"
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?
@lemosss on GitHub · 2026-11-24 03:26 UTC · original
lemosss:tests/gpu-64bit-int-and-f64-ops→main· +102 −0 · 1 files · 1 commits · openv_lshrrev_b64,v_ashrrev_i64,v_mad_i64_i32,v_fma_f64,v_min_f64andv_max_f64are translated (emit.rs, the 64-bit block after the VOPC compares) but no test names them; the existing 64-bit checks coverv_lshlrev_b64,v_mad_u64_u32and the f64 unary ops. This adds a randomized GPU test of the six against the CPU, bit for bit. Test only: no runtime change. I found no issue or open PR for these ops (searched the open PRs' titles and descriptions for each op name).What is in it
crates/xcl/src/gpu/recomp/tests.rs:gpu_64bit_int_and_f64_ops_random, one wave per dispatch in 50 dispatches (XCL_FUZZ_ITERS=nfor more), as wave64 where the GPU has it and as wave32:v_mad_i64_i32: the 64-bit result of i32 × i32 + i64, factors and addend includingi32::MIN/MAX, −1,i64::MIN/MAX;v_fma_f64againstf64::mul_add(one rounding), also with VOP3NEGon SRC2; inputs from the existingrand_f64(denormals, infinities and NaNs included; a NaN result matches any NaN);v_min_f64/v_max_f64, alsomaxwithABSon SRC0; b is often a, −a or a's neighbour, so ties and adjacent values are common. Pairs with a NaN and ±0 pairs of opposite signs are skipped: IEEE minNum / maxNum leave those open.Tested
stable-x86_64-pc-windows-msvc, VS 2022 Build Tools (MSVC 14.44), DXC 1.9.2609.5 (GitHub release,XCL_DXC_DIR); debug buildcargo test -p xcl --lib gpu_64bit_int_and_f64_ops_random -- --nocapture: passed,wave32: lanes 1600, min / max checked 1491 (545 with |a| = |b|), 0 distinct failuresXCL_TRANSLATED_CACHE=0:v_ashrrev_i64cast touint64_tinstead ofint64_t(a logical shift): 817 distinct failures, e.g.ashrrev_i64(amt 0x1, s 0x8abdb23003926697) = 0x455ed91801c9334b, want 0xc55ed91801c9334bv_min_f64translated asmax: 1226 distinct failurescargo build --workspace+cargo test --workspace --no-fail-fast -- --test-threads=4on this branch (main91f9a5e+ this commit): 692 passed, 1 failed, 41 ignored. The failure ishle::d3d12x::real::readback_routing_tests::coherent_buffer_sanitizes_console_flags_and_stateatreal.rs:5355(VirtualFreeof its 64 KB block returned 0), a test this PR does not touch. It passed 3 of 3 alone on this branch and 3 of 3 alone onmain91f9a5e, and four morecargo test -p xcl --lib -- --test-threads=4runs on this branch passed in full (653 passed, 0 failed), as did two onmain(652 passed). So it looks intermittent when it runs beside other tests.SKIPPED(no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardwareRegression run
tests.rs, no runtime fileNot tested
v_mad_i64_i32's SDST. It is translated as the unsigned carry of the 64-bit add (w < c, the same asv_mad_u64_u32). The ISA describes the op as{vcc_out, D.i64} = S0.i32 * S1.i32 + S2.i64; if that is read as one signed 65-bit result, the carry-out is bit 64 of the signed sum, which differs from the unsigned carry when an operand is negative. I could not check which the console hardware gives (no AMD GPU here), so the test leaves the SDST out. Mentioning it in case it matters.main91f9a5ewithout this commit (not run separately)AI use
@joeypercia on GitHub · 2026-11-24 03:39 UTC · original
AMD / native wave64 run (the Not tested item):
bfb6c4emerged ontomain91f9a5e(clean merge).Tested
gpu_64bit_int_and_f64_ops_random: passes on the RDNA2 iGPU, both passes ran (wave64: 3200 lanes, min / max checked 2948; wave32: 1600 lanes), and on the RTX 4070 Ti (wave32)cargo test --workspace --no-fail-fast -- --test-threads=4on the RDNA2 iGPU: 689 passed, 4 failed, 41 ignored. The 4 are outside this PR:placed_title_textures_share_vram_and_preserve_pixelsand the two lock-poison followers (#288 / #447), andfine_timer_makes_short_sleeps_short, all under load; the same 4 pass alone on this merge, 2 runs of 2.SKIPPED:gpu_geometry_mode_es_gs_strip,gpu_mesh_mode_two_passes(no mesh shaders)Not tested
v_mad_i64_i32's SDST (as in the description); release buildRun and report by Claude Code (Claude Opus 5.5).
@MesshM on GitHub · 2026-11-24 03:42 UTC · original
Test run of
bfb6c4ef1ad5ac7f87c3f41ca4a692baf47193aaon AMD RDNA4. I merged it onto currentmain91f9a5elocally (clean merge) and tested that tree.Tested
stable-x86_64-pc-windows-msvc, debugcargo build --workspace+cargo test --workspace -- --test-threads=4on the merge: 693 passed, 0 failed, 41 ignored, exit code 0;xcllib tests 653 passed, 0 failed, 21 ignoredSKIPPED;gpu_64bit_int_and_f64_ops_randompasses.Review: The 64-bit shifts take their count from S0[5:0] and the test feeds counts with high bits set;
v_mad_i64_i32is checked as the wrapping i64 result; min / max leave out NaN pairs and ±0 pairs, where IEEE minNum / maxNum allow either result, and fma runs with NEG on SRC2 and max with ABS on SRC0. I found nothing to change.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.
@lordon1a on GitHub · 2026-11-24 03:58 UTC · original
Independent test report on
bfb6c4e:Tested
616.64, wave32, SM 6.6), Intel i7-12700H, Windows 11 Home 26H2 (build 26200),rustc 1.100.0(x86_64-pc-windows-gnullvm), debug build, DXC1.9.2609.5(01b62ad4)cargo test -p xcl --lib gpu_64bit_int_and_f64_ops_random -- --nocapture0.95s(wave32: lanes 1600, min / max checked 1491 (545 with |a| = |b|), 0 distinct failures)Not tested
AI use
bfb6c4ein a detached worktree, audited the diff, ran the test, and posted this report.@JJAutoCompare on GitHub · 2026-11-25 06:24 UTC · original
Empirical test report (
bfb6c4ef)Hardware / environment
bfb6c4ef1ad5ac7f87c3f41ca4a692baf47193aain a clean worktree.Commands and results
cargo test -p xcl --lib --no-runoutside the Arc lock exited 0. Cargo built the library test executable with one deprecation warning.XCL_ADAPTER=A770andRUST_TEST_NOCAPTURE=1, ranxcl-00e28da3621caf64.exe gpu::recomp::tests::gpu_64bit_int_and_f64_ops_random --exact --nocapture --test-threads=1underInvoke-ArcTest.ps1. Exit 101. The harness reported 0 passed, 1 failed, 0 ignored and 673 filtered out. The UTF-8 log contained 0 case-sensitive lines starting withSKIPPED.Observed behavior
The PR adds one test whose shader combines 64-bit integer shifts, the vector result of
v_mad_i64_i32, and f64 FMA, min, and max. DXC loaded and the test reached pipeline creation.CreateComputePipelineStatereturnedThe parameter is incorrect. (0x80070057), and the test panicked on the returned error. The failure is consistent with the A770's reportedDoublePrecisionFloatShaderOps=0. The shader never dispatched, so the run yielded no GPU comparison coverage for either the integer or the f64 operations.Not tested
Full GPU workspace suite, adapters with f64 support, and game smoke runs.
AI use
Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr682-focused.log and published.
@DavidM1911 on GitHub · 2026-11-25 12:06 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.