Repository navigation
Conversation
v_lshrrev_b64, v_ashrrev_i64, v_mad_i64_i32, v_fma_f64, v_min_f64 and v_max_f64 are translated in emit.rs's 64-bit block, but no test names them: the existing 64-bit checks cover v_lshlrev_b64, v_mad_u64_u32 and the f64 unary ops. gpu_64bit_int_and_f64_ops_random runs the six against the CPU on random inputs, bit for bit, as wave64 and as wave32: any u32 shift amount (the ISA takes S0[5:0]), mad factors and addend with their extremes, fma against f64::mul_add, also with NEG on SRC2, and min / max with ties and neighbours, also max with ABS on SRC0. min / max skip pairs with a NaN and +-0 pairs of opposite signs, which minNum / maxNum leave open. v_mad_i64_i32's SDST is not checked. Measured on an RTX 4060 (wave32 only): 1600 lanes, 1491 min / max pairs checked (545 with |a| = |b|), 0 failures. A logical shift for v_ashrrev_i64 gives 817 distinct failures; max in place of v_min_f64 gives 1226.
|
AMD / native wave64 run (the Not tested item): Tested
Not tested
Run and report by Claude Code (Claude Opus 5.5). |
|
Test run of Tested
Review: The 64-bit shifts take their count from S0[5:0] and the test feeds counts with high bits set; Not tested: no retail title or regression run (I have no unpacked game), no Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code. |
towiice
left a comment
There was a problem hiding this comment.
Tested:
- Hardware: NVIDIA GeForce GTX 1650 SUPER (Turing TU116, 4 GB VRAM, 32-wide subgroups / wave32, driver 610.88), Windows 11 x64 (26H2 / 10.0.26300), DXC v1.9.2609 (
01b62ad4), toolchainstable-x86_64-pc-windows-gnullvm(llvm-mingw 23.1.6). - Recompiler GPU unit tests:
cargo test -p xcl --lib gpu::recomp::tests- Result: 116 passed, 0 failed, 17 ignored (including new 64-bit int and f64 tests:
gpu_64bit_int_and_f64_ops_random,gpu_f64_math_random).
- Result: 116 passed, 0 failed, 17 ignored (including new 64-bit int and f64 tests:
- E2E compute tests:
cargo test -p xcl --test gpu_compute_e2e -- --test-threads=1- Result: 2 passed, 0 failed, 0 ignored (
async_compute_pso_registers_real_pso_and_not_standin,console_wave64_compute_through_the_pso_hook_dispatch_and_read_back).
All tests pass cleanly on Turing hardware with zero regressions.
- Result: 2 passed, 0 failed, 0 ignored (
|
Independent test report on Tested
Not tested
AI use
|
Empirical test report (bfb6c4e)Hardware / environment
Commands and results
Observed behavior The PR adds one test whose shader combines 64-bit integer shifts, the vector result of 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. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
v_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