docs: one contract for v_div_fixup in design.md, matching the gfx1036 measurement (DOC-DIV-FIXUP-ROW) #1496

Merged
levi2m merged 1 commit from upstream-pr/1496 into main 2026-11-29 00:44:41 +00:00
levi2m commented 2026-11-25 02:08:42 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by levi2m on 2026-11-25T02:08:42Z.


Claimed in the coordination issue as: DOC-DIV-FIXUP-ROW (claim)
Depends on: none (follow-up to #1005, which fixed tools/f64_diff.py and left this row)
Fixes: none

What and why

The v_div_fixup_f16/v_div_fixup_f64 row in docs/design.md stated the rules twice. The first half (overflow at >= 16/>= 1024, underflow at <= -1075, quieted NaN sources, NaN(S0) keeping its payload) is the old model. The second half, which cites the gfx1036 measurement, is what the translator and tests/semantic/test_alu_div_fixup.py implement: no overflow cutoff, f64 underflow at <= -1076, sNaN unchanged under IEEE=0, NaN(S0) -> ±inf. This removes the stale half and keeps one rule set, with the NaN source order (S2 wins) stated once. The docstring of test_alu_div_fixup.py carried the same two stale lines and is brought in line. No behaviour changes.

Tested

  • python -I scripts/run_semantic_tests.py -p 'test_alu_div_fixup*.py' tests/semantic: 2 files, 11 tests, 0 failed.
  • python -I tests/test_docs_links.py, tests/test_docs_cli_flags.py, tests/test_text_write_line_endings.py: OK.
  • python -m pytest tests/test_docs_design_rows.py tests/test_design_contract_rows.py tests/test_f16_hw_words.py tests/test_values.py: 109 passed.
  • python -I scripts/check_no_game_data.py on both files: clean.

GPUs tested: n/a (docs and a test docstring only)
AI-assisted: yes

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5483762315 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1496). Originally posted by [levi2m](https://github.com/levi2m) on 2026-11-25T02:08:42Z. --- Claimed in the coordination issue as: DOC-DIV-FIXUP-ROW ([claim](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7150359366)) Depends on: none (follow-up to #1005, which fixed `tools/f64_diff.py` and left this row) Fixes: none ### What and why The `v_div_fixup_f16`/`v_div_fixup_f64` row in `docs/design.md` stated the rules twice. The first half (overflow at `>= 16`/`>= 1024`, underflow at `<= -1075`, quieted NaN sources, `NaN(S0)` keeping its payload) is the old model. The second half, which cites the gfx1036 measurement, is what the translator and `tests/semantic/test_alu_div_fixup.py` implement: no overflow cutoff, f64 underflow at `<= -1076`, sNaN unchanged under `IEEE=0`, `NaN(S0)` -> `±inf`. This removes the stale half and keeps one rule set, with the NaN source order (`S2` wins) stated once. The docstring of `test_alu_div_fixup.py` carried the same two stale lines and is brought in line. No behaviour changes. ### Tested - `python -I scripts/run_semantic_tests.py -p 'test_alu_div_fixup*.py' tests/semantic`: 2 files, 11 tests, 0 failed. - `python -I tests/test_docs_links.py`, `tests/test_docs_cli_flags.py`, `tests/test_text_write_line_endings.py`: OK. - `python -m pytest tests/test_docs_design_rows.py tests/test_design_contract_rows.py tests/test_f16_hw_words.py tests/test_values.py`: 109 passed. - `python -I scripts/check_no_game_data.py` on both files: clean. GPUs tested: n/a (docs and a test docstring only) AI-assisted: yes
ytsodacan commented 2026-11-25 03:36:39 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by ytsodacan on 2026-11-25T03:36:39Z.


[KEEP]

  • Docs-only (docs/design.md plus a docstring in tests/semantic/test_alu_div_fixup.py): the diff removes the stale first-half rules from the v_div_fixup_f16/f64 row and keeps the gfx1036-measured rules. This matches the stated intent and changes no behaviour.
  • No CI checks have run on head e0106f3b (gh pr checks reports none), so the docs and semantic checks the author lists are not independently confirmed.
  • I found no overlapping open PR for this row. This looks mergeable once CI runs green.
<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7152075536 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1496#issuecomment-7152075536). Originally posted by [ytsodacan](https://github.com/ytsodacan) on 2026-11-25T03:36:39Z. --- **[KEEP]** - Docs-only (`docs/design.md` plus a docstring in `tests/semantic/test_alu_div_fixup.py`): the diff removes the stale first-half rules from the `v_div_fixup_f16/f64` row and keeps the gfx1036-measured rules. This matches the stated intent and changes no behaviour. - No CI checks have run on head `e0106f3b` (`gh pr checks` reports none), so the docs and semantic checks the author lists are not independently confirmed. - I found no overlapping open PR for this row. This looks mergeable once CI runs green.
zmasi commented 2026-11-28 22:01:52 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T22:01:52Z.


#1496 | head e0106f3ba3 (merged cleanly with main a8465211fb) | python -I tests/semantic/test_alu_div_fixup.py -v + tests/test_docs_{design_rows,table_rows,links,repo_paths,cli_flags,encoding}.py | red on main: docs/design.md concatenated two contradictory contracts in the v_div_fixup_f16, v_div_fixup_f64 row (NaN(S2) -> quieted S2 alongside NaN(S2) -> S2 unchanged, plus duplicate underflow/overflow clauses), and tests/semantic/test_alu_div_fixup.py's module docstring still quoted the pre-gfx1036 quieting contract | green on PR+main: 6 ran, OK (test_alu_div_fixup.py) + all test_docs_*.py suites OK, with one unified gfx1036-measured contract matching the semantic test assertions | Windows 11 (10.0.26200.9974), Python 3.12.10 | AI-assisted: yes

Audited docs/design.md and tests/semantic/test_alu_div_fixup.py on Windows 11, running the semantic spirv_mini_interp suite (6/6 OK) and documentation validators (design_rows, table_rows, links, repo_paths, cli_flags, encoding, text_write_line_endings, ci_registration, and check_no_game_data.py) since no CI checks had run on e0106f3ba3.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7246446165 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1496#issuecomment-7246446165). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-28T22:01:52Z. --- #1496 | head e0106f3ba3c3bcec8bc1d7673edfdd5edd0bb94b (merged cleanly with main a8465211fb) | `python -I tests/semantic/test_alu_div_fixup.py -v` + `tests/test_docs_{design_rows,table_rows,links,repo_paths,cli_flags,encoding}.py` | red on main: `docs/design.md` concatenated two contradictory contracts in the `v_div_fixup_f16, v_div_fixup_f64` row (`NaN(S2) -> quieted S2` alongside `NaN(S2) -> S2 unchanged`, plus duplicate underflow/overflow clauses), and `tests/semantic/test_alu_div_fixup.py`'s module docstring still quoted the pre-`gfx1036` quieting contract | green on PR+main: `6 ran, OK` (`test_alu_div_fixup.py`) + all `test_docs_*.py` suites `OK`, with one unified `gfx1036`-measured contract matching the semantic test assertions | Windows 11 (`10.0.26200.9974`), Python 3.12.10 | AI-assisted: yes Audited `docs/design.md` and `tests/semantic/test_alu_div_fixup.py` on Windows 11, running the semantic `spirv_mini_interp` suite (`6/6 OK`) and documentation validators (`design_rows`, `table_rows`, `links`, `repo_paths`, `cli_flags`, `encoding`, `text_write_line_endings`, `ci_registration`, and `check_no_game_data.py`) since no CI checks had run on `e0106f3ba3`.
TheGeogeo commented 2026-11-29 00:17:22 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-29T00:17:22Z.


Tested e0106f3ba merged (no commit) with main 829530dbd: Python 3.12.4, Windows 11 10.0.26300, CPU only. check_no_game_data.py is clean.

  • Test and docs only (docs/design.md, tests/semantic/test_alu_div_fixup.py): 6 tests pass, and so does the main version.
  • There is no red to show, since no code file changes.

No blocker from my side.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7248008401 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1496#issuecomment-7248008401). Originally posted by [TheGeogeo](https://github.com/TheGeogeo) on 2026-11-29T00:17:22Z. --- Tested `e0106f3ba` merged (no commit) with `main` `829530dbd`: Python 3.12.4, Windows 11 10.0.26300, CPU only. `check_no_game_data.py` is clean. - Test and docs only (`docs/design.md`, `tests/semantic/test_alu_div_fixup.py`): 6 tests pass, and so does the `main` version. - There is no red to show, since no code file changes. No blocker from my side. AI-assisted (Claude Code).
MoonEyes commented 2026-11-29 00:44:43 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T00:44:43Z.


Merged after TheGeogeo's red/green check (check) (Windows, Python tests, no GPU needed) and a local re-check here. Merged after local re-verification: this PR merged onto main caafc45c0 without conflict, and its test file(s) (tests/semantic/test_alu_div_fixup.py) pass there. Earlier today the same tests failed on main without the PR (red/green) and a bundle with other open PRs showed no new failures. check_no_game_data.py is clean. Windows 11, Python 3.14; no GPU needed for these tests.

AI-assisted (Claude Code, Claude Opus 5.5), merged for MoonEyes.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7248321918 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1496#issuecomment-7248321918). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-29T00:44:43Z. --- Merged after **TheGeogeo**'s red/green check ([check](https://github.com/ProjectLeonida/mandy/pull/1496#issuecomment-7248008401)) (Windows, Python tests, no GPU needed) and a local re-check here. Merged after local re-verification: this PR merged onto `main` caafc45c0 without conflict, and its test file(s) (`tests/semantic/test_alu_div_fixup.py`) pass there. Earlier today the same tests failed on `main` without the PR (red/green) and a bundle with other open PRs showed no new failures. `check_no_game_data.py` is clean. Windows 11, Python 3.14; no GPU needed for these tests. _AI-assisted (Claude Code, Claude Opus 5.5), merged for MoonEyes._
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!1496
No description provided.