rdna2-hwprobe: valu_probe.py and its gfx1036 results (was #72) #208

Closed
github-bot wants to merge 3 commits from gh-pr/208/head into gh-pr/208/base
Owner

@⁠QuentinDanblon on GitHub · 2026-11-23 01:30 UTC · original
QuentinDanblon:pr/valu-probe → main · +512 −0 · 2 files · 3 commits · closed without merging

Library / area: tools/rdna2-hwprobe (no runtime code)

Exports changed (exports.txt rows): none

Source of the behaviour: results an RDNA2 GPU returned (gfx1036, measured by SchmashinPrunes), with kernels written from scratch against the RDNA2 ISA and assembled with LLVM 18. No third-party code, no game or console files.

Resubmission of #72, as you asked after #41 landed (as #133): only valu_probe.py and the probe notes, rebased on 2eda8b0, comment lines stripped. The notes are a section at the end of tools/rdna2-hwprobe/README.txt instead of the old README.md. 2 files, +512.

Three commits:

commit author content
9077c1c me valu_probe.py: 33 kernels on the existing runner and kernel preamble, for f16 FMA fusion (VOP2 0x36-0x38), s_bfe width, f32 NaN rules with IEEE mode off and on, and the normalized conversions
10923cc SchmashinPrunes his change from #72, authorship kept: show checks the outputs against the NaN rules he fitted on gfx1036 (nan_arith / nan_minmax). valu_probe.py part only, comment lines removed
215bb3d me README.txt: one line in the file list, and a section with the usage and the gfx1036 results

Results recorded in the README section (gfx1036 iGPU of a Ryzen 5 9600X, ROCm/HIP 5.7.1; RDNA2, not the console's gfx1013):

  • VOP2 0x36 / 0x37 / 0x38 are fused: they match hardware v_fma_f16 on all 254,891 inputs that separate the two models.
  • s_bfe: 7-bit width with sign-fill, 152 / 152.
  • Normalized conversions: round to nearest, NaN gives 0.
  • f32 NaN rules for fma / fmac / mul / add / sub / min / max, in both IEEE modes.

What was checked on this base

  • valu_probe.py is the #72 version minus its six comment lines (checked with diff).
  • valu_probe.py gen on 2eda8b0 writes byte-identical files (k.s, manifest, inputs) to the #72 version on its old base, so the kernels are the ones SchmashinPrunes ran.
  • Not done here: assembling and running. I have no AMD GPU and no LLVM AMDGPU toolchain on this machine. show was not rerun; in #72 it was exercised on simulated outputs by me and on the recorded gfx1036 outputs by SchmashinPrunes (0 differing results).

No comment lines added (PR gate: 2 files checked, 0 problems).

  • No runtime crate is touched, so there is no cargo test for this change
  • No game or console files and no binaries included
  • No fake success; anything not possible is left missing with a note

🤖 Generated with Claude Code

**@⁠QuentinDanblon** on GitHub · 2026-11-23 01:30 UTC · [original](https://github.com/omonkeyz/xbox-emulator/pull/208) `QuentinDanblon:pr/valu-probe` → `main` · +512 −0 · 2 files · 3 commits · closed without merging **Library / area:** tools/rdna2-hwprobe (no runtime code) **Exports changed (exports.txt rows):** none **Source of the behaviour:** results an RDNA2 GPU returned (gfx1036, measured by SchmashinPrunes), with kernels written from scratch against the RDNA2 ISA and assembled with LLVM 18. No third-party code, no game or console files. Resubmission of #72, as you asked after #41 landed (as #133): only `valu_probe.py` and the probe notes, rebased on `2eda8b0`, comment lines stripped. The notes are a section at the end of `tools/rdna2-hwprobe/README.txt` instead of the old `README.md`. 2 files, +512. Three commits: | commit | author | content | |---|---|---| | `9077c1c` | me | `valu_probe.py`: 33 kernels on the existing runner and kernel preamble, for f16 FMA fusion (VOP2 `0x36`-`0x38`), `s_bfe` width, f32 NaN rules with IEEE mode off and on, and the normalized conversions | | `10923cc` | SchmashinPrunes | his change from #72, authorship kept: `show` checks the outputs against the NaN rules he fitted on gfx1036 (`nan_arith` / `nan_minmax`). `valu_probe.py` part only, comment lines removed | | `215bb3d` | me | `README.txt`: one line in the file list, and a section with the usage and the gfx1036 results | Results recorded in the README section (gfx1036 iGPU of a Ryzen 5 9600X, ROCm/HIP 5.7.1; RDNA2, not the console's gfx1013): - VOP2 `0x36` / `0x37` / `0x38` are fused: they match hardware `v_fma_f16` on all 254,891 inputs that separate the two models. - `s_bfe`: 7-bit width with sign-fill, 152 / 152. - Normalized conversions: round to nearest, NaN gives 0. - f32 NaN rules for fma / fmac / mul / add / sub / min / max, in both IEEE modes. ### What was checked on this base - `valu_probe.py` is the #72 version minus its six comment lines (checked with `diff`). - `valu_probe.py gen` on `2eda8b0` writes byte-identical files (`k.s`, manifest, inputs) to the #72 version on its old base, so the kernels are the ones SchmashinPrunes ran. - Not done here: assembling and running. I have no AMD GPU and no LLVM AMDGPU toolchain on this machine. `show` was not rerun; in #72 it was exercised on simulated outputs by me and on the recorded gfx1036 outputs by SchmashinPrunes (0 differing results). No comment lines added (PR gate: 2 files checked, 0 problems). - [x] No runtime crate is touched, so there is no `cargo test` for this change - [x] No game or console files and no binaries included - [x] No fake success; anything not possible is left `missing` with a note 🤖 Generated with [Claude Code](https://claude.com/claude-code)
valu_probe.py uses the runner and kernel preamble of the rdna2-hwprobe harness
(SchmashinPrunes). 33 kernels that settle, on real RDNA2 hardware:
- whether VOP2 0x36-0x38 are fused (v_fmac/fmamk/fmaak_f16 per LLVM GFX10) or mul-then-add;
- whether the s_bfe width field is 7 bits and bounded, or taken modulo the operand size;
- which NaN the f32 arithmetic ops return, with IEEE mode off and on;
- rounding, NaN and range handling of the normalized conversions.

Not run on hardware by its author (no AMD GPU). The gen output on this base is
byte-identical to the one SchmashinPrunes ran on gfx1036.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
From SchmashinPrunes:valu-nan-rules (0acea8a), valu_probe.py part only, with
the comment lines removed for the PR gate.

nan_arith() / nan_minmax() encode the rules fitted on gfx1036; show_nan counts
the NaN-related results that differ from them, per instruction and IEEE mode.
Author's result on the recorded gfx1036 outputs: 0 differing results.
Measured by SchmashinPrunes on the gfx1036 iGPU of a Ryzen 5 9600X with the
generator unmodified:
- VOP2 0x36 / 0x37 / 0x38 are fused (v_fmac/fmamk/fmaak_f16);
- s_bfe uses the 7-bit width and sign-fills a signed field that reaches the
  top bit (152 / 152);
- the normalized conversions round to nearest, NaN gives 0;
- the f32 NaN rules he fitted, which valu_probe.py show checks.

RDNA2, not the console's gfx1013.

Co-authored-by: Isaac Wood <[email protected]>
Co-Authored-By: Claude Fable 5.2 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 06:13:57 +00:00
github-bot closed this pull request 2026-11-26 06:13:57 +00:00
Author
Owner

@⁠omonkeyz on GitHub · 2026-11-23 01:57 UTC · original

Applied in 35c979b, 52b2890 and 17dd550 (merged in ad24144) with your authorship kept, thanks. Trailing comments in valu_probe.py were dropped in f9c3ec5.

**@⁠omonkeyz** on GitHub · 2026-11-23 01:57 UTC · [original](https://github.com/omonkeyz/xbox-emulator/pull/208#issuecomment-7089549347) Applied in 35c979b, 52b2890 and 17dd550 (merged in ad24144) with your authorship kept, thanks. Trailing comments in valu_probe.py were dropped in f9c3ec5.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.