Repository navigation
Tests: f32 VOP1 math and bit scans against the CPU on random inputs - #2620
joeypercia wants to merge 1 commit into
Conversation
|
Update for head RDNA4 run (listed as untested) on an RX 9070 XT, plus an RTX 3060: Head
One thing visible in the numbers: the worst absolute sin/cos error is about 1e-7 on the RX 9070 XT with the HLSL path, and about 9.6e-5 on the RTX 3060 and on the RX 9070 XT with the direct DXIL path. All of these are inside the test's bounds. Why it differs was not looked into. Not tested: RDNA3, Intel, Linux / Wine. |
|
RX 6800M focused result on exact PR head $env:XCL_ADAPTER = '6800M'
$env:XCL_REQUIRE_GPU = 'wave64'
$env:XCL_DIRECT_DXIL = '1'
cargo test --locked -p xcl --lib gpu_f32_math_and_bit_scans_random -- --test-threads=1 --show-outputResult: 1 passed, 0 failed, 0 ignored, 1,336 filtered; 0
The fixture uses XCL's DXGI name selector; AI use: OpenAI Codex (GPT-6; exact serving variant unavailable) and a Luna subagent selected the test, verified adapter selection, ran it, and prepared this report. |
luckyteagirl
left a comment
There was a problem hiding this comment.
Could the exp2/log2 tolerance checks reject unordered results as the sin/cos check below does? With finite input 1.0, a GPU NaN produces a NaN error against the finite expected answer (2.0 for exp2, 0.0 for log2), and e > 1e-5 is false, so the test records no failure. Using !(e <= 1e-5) in both branches, or checking finiteness, would make the fixture catch this wrong result. Source review only at head 46301792; I did not run the GPU test. AI-assisted with Codex (GPT-6.2 Sol).
22 f32 unary ops and 32-bit bit scans (floor, ceil, trunc, rndne, fract, the three i32 conversions, frexp mant / exp, rcp, sqrt, rsq, exp, log, sin, cos, ffbh / ffbl / ffbh_i32, bfrev, bcnt) on random inputs weighted to the edges, wave64 and wave32, compared with the CPU: bit for bit where the ISA is exact, within ulps or a formula-sized tolerance for the transcendentals. f32 denormal lanes are counted and not checked. This is the test that found xcl-dev#580 (v_frexp_mant_f32 dropping the sign). It fails on main before xcl-dev#587 on both the HLSL route and direct DXIL, and passes after it.
4630179 to
6acae83
Compare
|
Yes, thanks. The exp2 and log2 checks now fail on a NaN error ( |
|
RTX 5070 (Blackwell) confirmation of the original randomized fixture on exact PR head Tested Windows 10 Pro 19045, i7-12700KF, NVIDIA GeForce RTX 5070 / driver 591.86, Rust 1.100.0 MSVC debug test build, DXC/DXIL 1.8.2502.11 and local D3D12 Agility SDK. Explicit Command, once with Each route reported 1 passed, 0 failed, 0 ignored, 1336 filtered out; no SKIPPED messages, and the same fixture summary:
The fixture excludes denormal inputs/results from the relevant floating-point comparisons; its bit-scan checks still precede the denormal-input exclusion. The test selected wave32 only on this card. No SKIPPED messages should not be read as native-wave64 coverage. The changed Not tested Native wave64, parent/negative control, full workspace, release-host build, other random seeds, other drivers/adapters or retail/gameplay. One test process per route; no timing/FPS conclusion. AI use OpenAI Codex (GPT-6; exact serving variant unavailable) fetched and verified the commit archive/API blob, ran the original fixture on both routes, checked nonzero wave32 summaries/skip markers and source integrity, and prepared this report. No source changes. |
|
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
Thanks! — Devin |
A GPU test of 22 f32 VOP1 ops and the 32-bit bit scans against the CPU on random inputs. It's the test that found #580 (
v_frexp_mant_f32dropped the sign). #587 fixed that, so the test goes up now, as said on #580.What is in it
crates/xcl/src/gpu/recomp/tests.rs:gpu_f32_math_and_bit_scans_random, test only.XCL_FUZZ_ITERS=n), wave64 and wave32.XCL_DIRECT_DXIL=1) throughdirect_or.Tested
XCL_ADAPTER=Radeon; Windows 11 Pro 26200; Rust 1.100.0 MSVC; DXC 1.8.2502.11; debug.cargo build --workspace, thencargo test --workspace --no-fail-fast -- --test-threads=4on6acae83a:STATUS_ACCESS_VIOLATIONpartway through, with 4 threads and no test named; run again, all of them passed. I could not tell which test it was.)gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1, which fails the same way onmainb49be183on this iGPU (DXIL fuzz tests: fuzz_validate_and_gpu_1 fails on AMD (seed 722 and others, RDNA2-4), so the default suite is red there #2115).gpu_f32_math_and_bit_scans_randomalone on both adapters (exp2 / log2 errors that are NaN fail the test since6acae83a, as luckyteagirl suggested), withXCL_DIRECT_DXIL=0and=1: passed in all four.mainjust before Recompiler: v_frexp_mant_f32 / _f16 keep the input's sign (#580) #587 (bd2ac507^1) the test fails on the RTX 4070 Ti withXCL_DIRECT_DXIL=0and=1.Regression run
crates/xcl/src/gpu/recomp/tests.rs).Not tested
AI use