Shader tests: special values of v_rcp/v_rsq/v_sqrt/v_log/v_exp_f32 #319

Open
github-bot wants to merge 1 commit from github-bot/gh-319 into main AGit
Owner

@⁠vladbondarenko97 on GitHub · 2026-11-24 23:32 UTC · original
vladbondarenko97:shader-tests/transcendental-specials → main · +123 −0 · 1 files · 1 commits · open

Adds one synthetic GPU test in crates/victory-shader/src/emit/valu_tests.rs for the special-value results of v_rcp_f32, v_rcp_iflag_f32, v_rsq_f32, v_sqrt_f32, v_log_f32 and v_exp_f32 against RDNA2: ±0, ±inf, NaN and negative inputs bit for bit (e.g. sqrt(−0) = −0, rsq(−0) = −inf, log(−0) = −inf, exp(−inf) = +0), and the 1 ULP the ISA allows on finite results. The lowering is the same as upstream VIctory's; here the test also covers the fork's clean-up passes over the finished module. Port of Marvisak/VIctory#1601 (same author). Tests only.

Tested

  • NVIDIA GeForce RTX 3080 Ti and WARP, Windows 11, on fork main 2119b0e: the new test passes on both.
  • cargo clippy -p victory-shader --all-targets --locked -- -D warnings: clean.

Not tested

  • AMD and Intel hardware; the full victory-shader suite on this head.

AI use

  • Claude Code with Claude Opus 5.5 ported the test, ran it on the hardware above and wrote this description.

🤖 Generated with Claude Code

**@⁠vladbondarenko97** on GitHub · 2026-11-24 23:32 UTC · [original](https://github.com/fxceless/victory-fork/pull/319) `vladbondarenko97:shader-tests/transcendental-specials` → `main` · +123 −0 · 1 files · 1 commits · open Adds one synthetic GPU test in `crates/victory-shader/src/emit/valu_tests.rs` for the special-value results of `v_rcp_f32`, `v_rcp_iflag_f32`, `v_rsq_f32`, `v_sqrt_f32`, `v_log_f32` and `v_exp_f32` against RDNA2: ±0, ±inf, NaN and negative inputs bit for bit (e.g. sqrt(−0) = −0, rsq(−0) = −inf, log(−0) = −inf, exp(−inf) = +0), and the 1 ULP the ISA allows on finite results. The lowering is the same as upstream VIctory's; here the test also covers the fork's clean-up passes over the finished module. Port of Marvisak/VIctory#1601 (same author). Tests only. **Tested** - NVIDIA GeForce RTX 3080 Ti and WARP, Windows 11, on fork main `2119b0e`: the new test passes on both. - `cargo clippy -p victory-shader --all-targets --locked -- -D warnings`: clean. **Not tested** - AMD and Intel hardware; the full `victory-shader` suite on this head. **AI use** - Claude Code with Claude Opus 5.5 ported the test, ran it on the hardware above and wrote this description. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Port of Marvisak/VIctory#1601 (same author). The lowering of these ops
is unchanged from VIctory main ffe310e; the test now also runs over this
fork's clean-up passes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:40:38 +00:00
Author
Owner

@⁠HAL9000RELOADED on GitHub · 2026-11-25 08:08 UTC · original

An AMD run for the "not tested on AMD" note.

Setup: Radeon RX 7900 XTX (RDNA3, waves of 32 to 64 lanes), Adrenalin 32.0.32015.7029, i7-13700KF, Windows 10 Pro 22H2 (19045), Rust 1.98.1. Windows 10's in-box D3D12 stops at SM 6.5, so the tree also carries the D3D12 Agility SDK 1.620 (the same approach as #69). The DXIL validator comes from SDK 10.0.26100 (VICTORY_DXIL). WARP stays below SM 6.6 on this machine, so the GPU cases ran on the card only. No game data used.

Base: main c96b4f2 plus the Agility patch and the stack-headroom test fix from Marvisak/VIctory#742. The PR head f00c660 was merged on top of it.

rcp_rsq_sqrt_log_exp_f32_special_values_match_rdna2 passes on the card. Only WARP printed "skipped", so the hardware device ran every case. The whole workspace with this PR: 505 passed, 0 failed.

**@⁠HAL9000RELOADED** on GitHub · 2026-11-25 08:08 UTC · [original](https://github.com/fxceless/victory-fork/pull/319#issuecomment-7156655969) An AMD run for the "not tested on AMD" note. **Setup:** Radeon RX 7900 XTX (RDNA3, waves of 32 to 64 lanes), Adrenalin 32.0.32015.7029, i7-13700KF, Windows 10 Pro 22H2 (19045), Rust 1.98.1. Windows 10's in-box D3D12 stops at SM 6.5, so the tree also carries the D3D12 Agility SDK 1.620 (the same approach as #69). The DXIL validator comes from SDK 10.0.26100 (`VICTORY_DXIL`). WARP stays below SM 6.6 on this machine, so the GPU cases ran on the card only. No game data used. **Base:** `main` `c96b4f2` plus the Agility patch and the stack-headroom test fix from Marvisak/VIctory#742. The PR head `f00c660` was merged on top of it. `rcp_rsq_sqrt_log_exp_f32_special_values_match_rdna2` passes on the card. Only WARP printed "skipped", so the hardware device ran every case. The whole workspace with this PR: 505 passed, 0 failed.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/319/head:github-bot/gh-319'
git switch 'github-bot/gh-319'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-319'
git switch 'github-bot/gh-319'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-319'
git switch 'github-bot/gh-319'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-319'
git switch 'main'
git merge --squash 'github-bot/gh-319'
git switch 'main'
git merge --ff-only 'github-bot/gh-319'
git switch 'main'
git merge 'github-bot/gh-319'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.