OLD-3011: tests/semantic: run v_div_fixup_f32 through the translator, not a mock oracle (TEST-545) #762

Merged
whoalin1 merged 1 commit from upstream-pr/762 into main 2026-11-28 11:54:18 +00:00
whoalin1 commented 2026-11-24 13:34:20 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-24T13:34:20Z.


Restores my open PR from the original repository (OLD-3011 / TEST-545), rebased onto current main (2d73c242f).

Claim: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7133003627

Summary

  • tests/semantic/test_valu_div_fixup.py previously compared a hand-written Python model against itself without importing tools/rdna2spirv.py, so it passed regardless of what the translator emitted.
  • Replaces the self-testing mock oracle with real translator assertions against tools/rdna2spirv.py and spirv_mini_interp: pure-integer lowering op order and measured classification constants, NaN(S2) over NaN(S1) read off the dataflow, measured rule words, clamp/omod ordering, EXEC-masked preservation, and null-destination behavior.
  • Adds tests/semantic/fixtures/div_fixup_f32.asm and updates tests/semantic/README.md.

Verification (rebased on 2d73c242f)

  • py -3.14 -m unittest discover -s tests/semantic -p test_valu_div_fixup.py -v — 8/8 passed
  • py -3.14 -m unittest discover -s tests/semantic -p test_alu_div_fixup_f32.py -v — 4/4 passed
  • py -3.14 -I tests/test_text_write_line_endings.py — 3/3 passed

AI-assisted (Gemini 4 Neon).

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5473154966 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/762). Originally posted by [whoalin1](https://github.com/whoalin1) on 2026-11-24T13:34:20Z. --- Restores my open PR from the original repository (OLD-3011 / TEST-545), rebased onto current `main` (`2d73c242f`). Claim: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7133003627 ### Summary - `tests/semantic/test_valu_div_fixup.py` previously compared a hand-written Python model against itself without importing `tools/rdna2spirv.py`, so it passed regardless of what the translator emitted. - Replaces the self-testing mock oracle with real translator assertions against `tools/rdna2spirv.py` and `spirv_mini_interp`: pure-integer lowering op order and measured classification constants, `NaN(S2)` over `NaN(S1)` read off the dataflow, measured rule words, `clamp`/`omod` ordering, EXEC-masked preservation, and null-destination behavior. - Adds `tests/semantic/fixtures/div_fixup_f32.asm` and updates `tests/semantic/README.md`. ### Verification (rebased on `2d73c242f`) - `py -3.14 -m unittest discover -s tests/semantic -p test_valu_div_fixup.py -v` — **8/8 passed** - `py -3.14 -m unittest discover -s tests/semantic -p test_alu_div_fixup_f32.py -v` — **4/4 passed** - `py -3.14 -I tests/test_text_write_line_endings.py` — **3/3 passed** AI-assisted (Gemini 4 Neon).
abnalstlll-byte commented 2026-11-24 13:35:25 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-24T13:35:25Z.

Review: APPROVED


Audited and verified. Clean-room compliant.

  • Connects v_div_fixup_f32 tests to the actual tools/rdna2spirv.py translator in tests/semantic/test_valu_div_fixup.py.
  • Validates pure-integer lowering op order, classification constants, and NaN priority through spirv_mini_interp execution.
  • Replaces disconnected model simulation with genuine translator test coverage.
<!-- greyfinch-sync:ubiquitarianism/leonida:review:6040136231 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/762#pullrequestreview-6040136231). Originally posted by [abnalstlll-byte](https://github.com/abnalstlll-byte) on 2026-11-24T13:35:25Z. **Review:** APPROVED --- Audited and verified. Clean-room compliant. - Connects v_div_fixup_f32 tests to the actual tools/rdna2spirv.py translator in tests/semantic/test_valu_div_fixup.py. - Validates pure-integer lowering op order, classification constants, and NaN priority through spirv_mini_interp execution. - Replaces disconnected model simulation with genuine translator test coverage.
whoalin1 commented 2026-11-25 20:02:56 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-25T20:02:56Z.


Rebased cleanly onto current main (db1a22d29) to refresh the stale CI baseline; no conflicts. The branch remains the single TEST-545 semantic-oracle replacement commit. AI-assisted with Devin.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7173114981 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/762#issuecomment-7173114981). Originally posted by [whoalin1](https://github.com/whoalin1) on 2026-11-25T20:02:56Z. --- Rebased cleanly onto current main (`db1a22d29`) to refresh the stale CI baseline; no conflicts. The branch remains the single TEST-545 semantic-oracle replacement commit. AI-assisted with Devin.
whoalin1 commented 2026-11-28 10:04:44 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-28T10:04:44Z.


Rebased cleanly onto main (33db04a70) to resolve the bullet conflict in tests/semantic/README.md (keeping both test_fma_fused_fixture.py from main and test_valu_div_fixup.py). Head is now 2d62a50a0d2c41ca58086d88c744c79e41db18aa.

Verification (rebased on 33db04a70)

  • python -m unittest discover -s tests/semantic -p test_valu_div_fixup.py -v — 8/8 passed
  • python -m unittest discover -s tests/semantic -p "test_*div*.py" -v — 67/67 passed (includes test_alu_div_fixup_f32.py, 5/5)
  • python -m unittest discover -s tests/semantic -p test_fixtures.py -v — 1/1 passed
  • python -I tests/test_text_write_line_endings.py & python -m unittest discover -s tests -p test_text_write_line_endings.py -v — 3/3 passed
  • python -I scripts/check_no_game_data.py on all 3 touched files — clean (exit 0)

CPU-only semantic/translator test changes (no GPU run needed). AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7237656497 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/762#issuecomment-7237656497). Originally posted by [whoalin1](https://github.com/whoalin1) on 2026-11-28T10:04:44Z. --- Rebased cleanly onto `main` (`33db04a70`) to resolve the bullet conflict in `tests/semantic/README.md` (keeping both `test_fma_fused_fixture.py` from `main` and `test_valu_div_fixup.py`). Head is now `2d62a50a0d2c41ca58086d88c744c79e41db18aa`. ### Verification (rebased on `33db04a70`) - `python -m unittest discover -s tests/semantic -p test_valu_div_fixup.py -v` — **8/8 passed** - `python -m unittest discover -s tests/semantic -p "test_*div*.py" -v` — **67/67 passed** (includes `test_alu_div_fixup_f32.py`, 5/5) - `python -m unittest discover -s tests/semantic -p test_fixtures.py -v` — **1/1 passed** - `python -I tests/test_text_write_line_endings.py` & `python -m unittest discover -s tests -p test_text_write_line_endings.py -v` — **3/3 passed** - `python -I scripts/check_no_game_data.py` on all 3 touched files — clean (`exit 0`) CPU-only semantic/translator test changes (no GPU run needed). AI-assisted.
sodove commented 2026-11-28 10:45:46 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by sodove on 2026-11-28T10:45:46Z.


#762 | head 2d62a50a0d2c41ca58086d88c744c79e41db18aa | python3 -m unittest discover -s tests/semantic -p test_valu_div_fixup.py -v | red: 8 passed | green: 8 passed | Passed on both trees

This adds regression coverage for v_div_fixup_f32. The translated shader already matched the expected values on this main.

Captured 6 distinct complete SPIR-V module(s) emitted while rerunning test_valu_div_fixup.py on the merged tree. All assembled and passed spirv-val for Vulkan 1.2 with --allow-offset-texture-operand.

Base 3bd936ecd98995bca3e1da83d5e28d2343001aef was merged into the recorded PR head for the second run. Ubuntu 26.04.1 (WSL2), Python 3.14.4. Counts include unittest subtest events where applicable. AI-assisted with OpenAI Codex. Batch claim.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7238105386 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/762#issuecomment-7238105386). Originally posted by [sodove](https://github.com/sodove) on 2026-11-28T10:45:46Z. --- #762 | head `2d62a50a0d2c41ca58086d88c744c79e41db18aa` | `python3 -m unittest discover -s tests/semantic -p test_valu_div_fixup.py -v` | red: 8 passed | green: 8 passed | **Passed on both trees** This adds regression coverage for v_div_fixup_f32. The translated shader already matched the expected values on this main. Captured 6 distinct complete SPIR-V module(s) emitted while rerunning test_valu_div_fixup.py on the merged tree. All assembled and passed spirv-val for Vulkan 1.2 with --allow-offset-texture-operand. Base `3bd936ecd98995bca3e1da83d5e28d2343001aef` was merged into the recorded PR head for the second run. Ubuntu 26.04.1 (WSL2), Python 3.14.4. Counts include unittest subtest events where applicable. AI-assisted with OpenAI Codex. [Batch claim](https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7237873883).
DadaCap commented 2026-11-28 11:54:20 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-28T11:54:20Z.


Merged, thank you @whoalin1! This translator PR (OLD-3011: tests/semantic: run v_div_fixup_f32 through the translator, not a mock oracle (TEST-545)) passed its own tests with main merged in during sodove's verification of this batch, so it went in with the batch.

AI-assisted (Claude Code, Claude Opus 5.5), posted for the maintainers.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7238859853 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/762#issuecomment-7238859853). Originally posted by [DadaCap](https://github.com/DadaCap) on 2026-11-28T11:54:20Z. --- Merged, thank you @whoalin1! This translator PR (OLD-3011: tests/semantic: run v_div_fixup_f32 through the translator, not a mock oracle (TEST-545)) passed its own tests with main merged in during sodove's verification of this batch, so it went in with the batch. AI-assisted (Claude Code, Claude Opus 5.5), posted for the maintainers.
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!762
No description provided.