Shader tests: special values of v_rcp/v_rsq/v_sqrt/v_log/v_exp_f32 #1600
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1601"
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?
Imported from Marvisak/VIctory. Originally posted by vladbondarenko97 on 2026-11-24T19:41:31Z.
Adds a synthetic GPU test in
crates/victory-shader/src/emit/valu_tests.rsforv_rcp_f32,v_rcp_iflag_f32,v_rsq_f32,v_sqrt_f32,v_log_f32andv_exp_f32. ±0, ±inf, NaN, negative inputs and overflow/underflow are checked bit for bit against RDNA2 (e.g. sqrt(−0) = −0, rsq(−0) = −inf, log(−0) = −inf, exp(−inf) = +0, exp(128) = +inf, exp(−200) = +0); finite results must be within the 1 ULP the ISA allows, against f64 references. These ops lower tofdivand the DXIL Rsqrt / Sqrt / Log / Exp intrinsics, whose edge cases are up to the host driver, and nothing tested them before. Tests only.Tested
mainffe310e: the new testrcp_rsq_sqrt_log_exp_f32_special_values_match_rdna2passes on both.cargo test --workspace --locked(idle GPU): 343 passed, 0 failed, 6 ignored.cargo clippy --workspace --all-targets --locked -- -D warningsand the same with--all-features: clean.rustfmt --edition 2024 --checkon the file: clean.Not tested
AI use
🤖 Generated with Claude Code
upstream-sync referenced this pull request2026-11-24 21:02:52 +00:00
Imported from Marvisak/VIctory. Originally posted by Calvix2k on 2026-11-24T21:14:13Z.
Hardware run of
rcp_rsq_sqrt_log_exp_f32_special_values_match_rdna2on head8a55155:D3D12Core.dll+ exports, not part of the repo).cargo test -p victory-shader --locked rcp_rsq_sqrt_log_exp_f32_special_values_match_rdna2 -- --test-threads=1 --nocapture— 1 passed, 0 failed on the hardware backend.Imported from Marvisak/VIctory. Originally posted by vladbondarenko97 on 2026-11-25T00:48:03Z.
Closing:
semantics_tests.rs'stranscendental_specials_match_the_hardware(on main since this was opened) covers the same ops and special inputs, including the omod/clamp/abs variants. This test still passes on the merged tree (RTX 3080 Ti + WARP), so nothing is lost. Thanks! (Checked with Claude Code, Claude Sonnet 5.5.)Pull request closed