wint_diff: GFX12 has no always-true/false VALU compare; skip those programs by name (OLD-9928) #1332

Merged
fin-github merged 1 commit from upstream-pr/1332 into main 2026-11-28 14:30:40 +00:00
fin-github commented 2026-11-24 21:58:13 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fin-github on 2026-11-24T21:58:13Z.


Claimed in the coordination issue as: OLD-9928 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7145581073)

Supersedes draft #197, carried over from old upstream PR 9928 in the original repository. This is the same change cherry-picked onto current main (git cherry-pick -x), with the original author (Størm) kept on every commit. The change and its explanation are theirs; see #197 for the original description.

Tested

Windows 11 Pro 26200, CPython 3.14.4, on main 4a50cafc7. No GPU, no game files.

  • On this branch: tests/test_hw_oracle.py: 60 OK (3 skipped); tests/test_wint_diff.py: 30 OK
  • The same test file(s) with main's code: test_gfx12_has_no_always_true_or_false_valu_compare and test_gfx12_skips_its_removed_compares_by_name_and_never_assembles_them error, so the tests still catch the bug on current main.
  • scripts/check_no_game_data.py on the changed files and tests/test_text_write_line_endings.py: clean.

GPUs tested: n/a

AI-assisted: yes (Claude Code). The cherry-pick and the test runs were done by the agent; the code is the original author's.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5481020252 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1332). Originally posted by [fin-github](https://github.com/fin-github) on 2026-11-24T21:58:13Z. --- Claimed in the coordination issue as: `OLD-9928` (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7145581073) Supersedes draft #197, carried over from old upstream PR 9928 in the original repository. This is the same change cherry-picked onto current `main` (`git cherry-pick -x`), with the original author (Størm) kept on every commit. The change and its explanation are theirs; see #197 for the original description. ### Tested Windows 11 Pro 26200, CPython 3.14.4, on `main` 4a50cafc7. No GPU, no game files. - On this branch: `tests/test_hw_oracle.py`: 60 OK (3 skipped); `tests/test_wint_diff.py`: 30 OK - The same test file(s) with `main`'s code: `test_gfx12_has_no_always_true_or_false_valu_compare` and `test_gfx12_skips_its_removed_compares_by_name_and_never_assembles_them` error, so the tests still catch the bug on current `main`. - `scripts/check_no_game_data.py` on the changed files and `tests/test_text_write_line_endings.py`: clean. GPUs tested: n/a AI-assisted: yes (Claude Code). The cherry-pick and the test runs were done by the agent; the code is the original author's.
whoalin1 commented 2026-11-24 23:43:43 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-24T23:43:43Z.


Independent verification (overnight shift, CPU/tooling only, no game data).

Commands run on head ddd1923c (Git Bash, py -3.14):

  • py -3.14 -m compileall -q tools/wint_diff.py tools/hw_oracle/asm.py tests/test_wint_diff.py tests/test_hw_oracle.py — clean
  • py -3.14 -I tests/test_hw_oracle.py: Ran 60 tests, OK (3 skipped — environment, unrelated)
  • py -3.14 -I tests/test_wint_diff.py: Ran 30 tests, OK
  • py -3.14 -I tools/wint_diff.py --self-test: match True, hand values True, unsupported form skipped True
  • Direct check of asm.valu_skip_reason: v_cmp_t_u32, v_cmp_t_u32_e64, v_cmpx_f_i32_e32, v_cmp_f_i64_e64 all return the 'removed in GFX12' reason on gfx1201 and None on gfx1150; v_cmp_eq_u32 unaffected.

Code check: GFX12_VALU_REMOVED covers all 16 v_cmp_/v_cmpx_ × t/f × i32/u32/i64/u64 spellings; the new _e32/_e64 suffix strip in valu_skip_reason is safe because it only feeds the removal tables (VALU_REMOVED ops are gone in all _e forms too). hw_results partitions programs so skipped ones are never sent to oracle.run — verified by the Fake oracle test asserting only 1 of 4 kernels was assembled on gfx1201. Skipped programs surface as str reasons which compare already counts as named skips (isinstance(got, str) → Skip), not assembler rejections. Real oracles (hw_oracle/runner.py, drm.py) expose .arch, and hw_skip no-ops for oracles without one.

Verdict: verified, correct.

AI-assisted verification (Devin).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7147727809 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1332#issuecomment-7147727809). Originally posted by [whoalin1](https://github.com/whoalin1) on 2026-11-24T23:43:43Z. --- Independent verification (overnight shift, CPU/tooling only, no game data). Commands run on head ddd1923c (Git Bash, py -3.14): - `py -3.14 -m compileall -q tools/wint_diff.py tools/hw_oracle/asm.py tests/test_wint_diff.py tests/test_hw_oracle.py` — clean - `py -3.14 -I tests/test_hw_oracle.py`: Ran 60 tests, OK (3 skipped — environment, unrelated) - `py -3.14 -I tests/test_wint_diff.py`: Ran 30 tests, OK - `py -3.14 -I tools/wint_diff.py --self-test`: match True, hand values True, unsupported form skipped True - Direct check of `asm.valu_skip_reason`: `v_cmp_t_u32`, `v_cmp_t_u32_e64`, `v_cmpx_f_i32_e32`, `v_cmp_f_i64_e64` all return the 'removed in GFX12' reason on gfx1201 and None on gfx1150; `v_cmp_eq_u32` unaffected. Code check: `GFX12_VALU_REMOVED` covers all 16 v_cmp_/v_cmpx_ × t/f × i32/u32/i64/u64 spellings; the new `_e32/_e64` suffix strip in `valu_skip_reason` is safe because it only feeds the removal tables (VALU_REMOVED ops are gone in all _e forms too). `hw_results` partitions programs so skipped ones are never sent to `oracle.run` — verified by the Fake oracle test asserting only 1 of 4 kernels was assembled on gfx1201. Skipped programs surface as str reasons which `compare` already counts as named skips (`isinstance(got, str)` → Skip), not assembler rejections. Real oracles (`hw_oracle/runner.py`, `drm.py`) expose `.arch`, and `hw_skip` no-ops for oracles without one. Verdict: verified, correct. AI-assisted verification (Devin).
MoonEyes commented 2026-11-28 14:30:35 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T14:30:35Z.


Red/green: pytest tests/test_hw_oracle.py tests/test_wint_diff.py fails on main (2 failed, 87 passed, 10 skipped, 31 subtests passed) and passes on head ddd1923cb2 merged with main (89 passed, 10 skipped, 31 subtests passed).
Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main d48a957bb in GitHub Actions: no new failure.
AI-assisted (Claude Code, Claude Opus 5.5)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7240722825 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1332#issuecomment-7240722825). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-28T14:30:35Z. --- Red/green: `pytest tests/test_hw_oracle.py tests/test_wint_diff.py` fails on main (2 failed, 87 passed, 10 skipped, 31 subtests passed) and passes on head ddd1923cb2db merged with main (89 passed, 10 skipped, 31 subtests passed). Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main d48a957bb in GitHub Actions: no new failure. AI-assisted (Claude Code, Claude Opus 5.5)
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!1332
No description provided.