Tests: f32 VOP1 math and bit scans against the CPU on random inputs #2620
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!2620
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2620"
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?
@joeypercia on GitHub · 2026-11-26 02:43 UTC · original
joeypercia:tests-f32-math-random→main· +145 −0 · 1 files · 1 commits · openA 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 (#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 #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
@DarkPanda69 on GitHub · 2026-11-26 02:46 UTC · original · edited 2026-11-26 05:56 UTC
Update for head
6acae83: rerun onmainb49be18, same cards.gpu_f32_math_and_bit_scans_randompasses on both at the default 50 dispatches and atXCL_FUZZ_ITERS=500, with the same worst-case numbers as in the table below.RDNA4 run (listed as untested) on an RX 9070 XT, plus an RTX 3060:
gpu_f32_math_and_bit_scans_randompasses on both, at the default 50 dispatches, atXCL_FUZZ_ITERS=500and withXCL_DIRECT_DXIL=1.Head
4630179applied onmainb49be18, debug, Windows 11 Pro 26200, card chosen withXCL_ADAPTER,cargo test -p xcl --lib -- gpu_f32_math_and_bit_scans_random --nocapture. The test's own summary lines:XCL_FUZZ_ITERS=500XCL_DIRECT_DXIL=1One 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.
AI use: Claude Code (Claude Opus 5.5) ran the test on this machine and wrote this report.
@luckyteagirl on GitHub · 2026-11-26 03:45 UTC · original
RX 6800M focused result on exact PR head
46301792dc39bed64972396f35b6023815d9d10f(clean checkout): Windows 11 Home build 26200, Ryzen 9 5980HX, AMD Radeon RX 6800M, driver30.0.13002.13003, Rust 1.99.0 MSVC, debug test build.Result: 1 passed, 0 failed, 0 ignored, 1,336 filtered; 0
SKIPPEDnotices. The guarded run exited 0 with no memory guard trigger. The test reported:The fixture uses XCL's DXGI name selector;
6800Muniquely matches this machine's RX 6800M, andXCL_REQUIRE_GPU=wave64makes unavailable required coverage fail rather than silently pass. The test output itself does not print the adapter name. This was the focused synthetic test only; I did not run the full workspace suite or a retail title on this PR head.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.
46301792dcto6acae83ad1@joeypercia on GitHub · 2026-11-26 05:40 UTC · original
Yes, thanks. The exp2 and log2 checks now fail on a NaN error (
!(e <= 1e-5)), as the sin/cos check does. Amended into6acae83a. That commit passes the test on the RTX 4070 Ti and on the RDNA2 iGPU, withXCL_DIRECT_DXIL=0and with=1. The whole suite ran on both adapters too; the counts are in the description. (Claude Code, Claude Opus 5.5)@luckyteagirl on GitHub · 2026-11-26 05:25 UTC · original · reviewed
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.0for exp2,0.0for log2), ande > 1e-5is 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 head46301792; I did not run the GPU test. AI-assisted with Codex (GPT-6.2 Sol).@zhouzhidong3-hash on GitHub · 2026-11-26 06:26 UTC · original
RTX 5070 (Blackwell) confirmation of the original randomized fixture on exact PR head
6acae83ad18727740cfbf2602ce0a10fbc3d8d73, using the unchanged official commit archive.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
XCL_ADAPTER=5070,XCL_FUZZ_ITERS=500.Command, once with
XCL_DIRECT_DXIL=0(HLSL), then once withXCL_DIRECT_DXIL=1(direct DXIL):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
tests.rsGit blob matches the GitHub API (94fd176a64d71f6ebe44e289d029c3e4ac9c036d); all 210 Rust source hashes were unchanged before/after. Archive SHA256:91ff895fd854e0129efc2a1364728ab4c5e3497b3f698c2abd337342ff93f69e.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.
@DavidM1911 on GitHub · 2026-11-26 08:29 UTC · original
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
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.