docs/design: de-duplicate the s_bfe contract-table row #2490

Merged
leonida/mandy
thiefyzheng merged 1 commit from fix/design-md-duplicated-rows into main 2026-11-29 21:12:57 +00:00

Pull request successfully merged and closed

thiefyzheng commented 2026-11-27 18:27:29 +00:00

Claimed in the coordination issue as: DOCS-DESIGN-DUPLICATED-ROWS (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7225493256), from kawaii-shakal's finding (#1608#issuecomment-7225444802)

What and why

The s_bfe_u32 / s_bfe_i32 past bit 31 contract-table row in docs/design.md came out of an old merge with its Source sentences repeated, ending in **RDNA2 is not measured** directly after the RDNA2 measurements (gfx1035, gfx1036) in the same row. The repeats and that stale closing sentence are dropped; the LLVM constantFoldBFE comparison stays.

Only this row changes. As requested in review, the overlapping 64-bit scalar bitwise ops row is byte-identical to main and its independent cleanup is left to #1450. No measurement is added or changed, and every measured claim in the s_bfe row is kept once.

Tested

Docs only. All 61 tests in tests/test_docs_*.py and tests/test_design_contract_rows.py pass on the rebased head. scripts/check_no_game_data.py docs/design.md and git diff --check are clean. The hardware claims were not re-measured.

GPUs tested: n/a

AI-assisted: yes (Claude Code)

Checklist

  • Based on current main and merges cleanly.
  • One topic.
  • No game data, keys or decryption.
  • A new translator rule is in the contract table: n/a, no rule added.
Claimed in the coordination issue as: DOCS-DESIGN-DUPLICATED-ROWS (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7225493256), from kawaii-shakal's finding (#1608#issuecomment-7225444802) ### What and why The `s_bfe_u32` / `s_bfe_i32` past bit 31 contract-table row in `docs/design.md` came out of an old merge with its Source sentences repeated, ending in `**RDNA2 is not measured**` directly after the RDNA2 measurements (gfx1035, gfx1036) in the same row. The repeats and that stale closing sentence are dropped; the LLVM `constantFoldBFE` comparison stays. Only this row changes. As requested in review, the overlapping `64-bit scalar bitwise ops` row is byte-identical to `main` and its independent cleanup is left to #1450. No measurement is added or changed, and every measured claim in the `s_bfe` row is kept once. ### Tested Docs only. All **61 tests** in `tests/test_docs_*.py` and `tests/test_design_contract_rows.py` pass on the rebased head. `scripts/check_no_game_data.py docs/design.md` and `git diff --check` are clean. The hardware claims were not re-measured. GPUs tested: n/a AI-assisted: yes (Claude Code) ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic. - [x] No game data, keys or decryption. - [ ] A new translator rule is in the contract table: n/a, no rule added.
kawaii-shakal commented 2026-11-27 19:14:13 +00:00

The s_bfe_u32 / s_bfe_i32 part looks right to me: it drops the repeated Source sentences and the trailing "RDNA2 is not measured", which contradicted the RDNA2 measurements earlier in the same row.

The "64-bit scalar bitwise ops" part overlaps #1450 (open since Nov 26, same row) and conflicts with it. It also keeps "Hardware-verified on the same part through tools/hw_oracle" with no part named before it in the row (main has the same dangling reference after the bad merge), so the hw_oracle words are not tied to a GPU. #1450 names the part. Maybe drop the 64-bit row from this PR and leave it to #1450, or take its wording?

AI-assisted (Claude Code); I compared the two diffs against main 43a9d562.


Generated by Claude Code

The `s_bfe_u32` / `s_bfe_i32` part looks right to me: it drops the repeated Source sentences and the trailing "**RDNA2 is not measured**", which contradicted the RDNA2 measurements earlier in the same row. The "64-bit scalar bitwise ops" part overlaps #1450 (open since Nov 26, same row) and conflicts with it. It also keeps "**Hardware-verified** on the same part through `tools/hw_oracle`" with no part named before it in the row (main has the same dangling reference after the bad merge), so the hw_oracle words are not tied to a GPU. #1450 names the part. Maybe drop the 64-bit row from this PR and leave it to #1450, or take its wording? AI-assisted (Claude Code); I compared the two diffs against main 43a9d562. --- _Generated by [Claude Code](https://claude.ai/code)_
thiefyzheng commented 2026-11-28 21:02:22 +00:00

@kawaii-shakal — took the first option and dropped the 64-bit scalar row from this PR, leaving that independent cleanup to #1450.

Rebased onto main 54d27d9883; new head is 2c96ab605ce74f92d917e714d070f94ddc3887d2. The only changed row is now s_bfe_u32 / s_bfe_i32; the 64-bit scalar bitwise ops row is byte-identical to main. PR title and body are updated to match.

All 61 tests in tests/test_docs_*.py and tests/test_design_contract_rows.py pass; check_no_game_data.py and git diff --check are clean. No hardware claims re-measured. AI-assisted.

@kawaii-shakal — took the first option and dropped the 64-bit scalar row from this PR, leaving that independent cleanup to #1450. Rebased onto `main` `54d27d9883`; new head is `2c96ab605ce74f92d917e714d070f94ddc3887d2`. The only changed row is now `s_bfe_u32` / `s_bfe_i32`; the `64-bit scalar bitwise ops` row is byte-identical to `main`. PR title and body are updated to match. All 61 tests in `tests/test_docs_*.py` and `tests/test_design_contract_rows.py` pass; `check_no_game_data.py` and `git diff --check` are clean. No hardware claims re-measured. AI-assisted.
thiefyzheng commented 2026-11-28 21:20:27 +00:00

CI has settled on 2c96ab605c: no-game-data passes and the code-only jobs are correctly skipped for this docs-only change. The sole red job is change-scope's pre-existing repository-rename mismatch: test_make_game_preflight.py still expects the old ubiquitarianism/leonida clone command while README names ProjectLeonida/mandy. The same failure is present in main's core suite; this PR does not touch either file. All 61 docs/contract tests pass locally on this head. AI-assisted.

CI has settled on `2c96ab605c`: `no-game-data` passes and the code-only jobs are correctly skipped for this docs-only change. The sole red job is `change-scope`'s pre-existing repository-rename mismatch: `test_make_game_preflight.py` still expects the old `ubiquitarianism/leonida` clone command while README names `ProjectLeonida/mandy`. The same failure is present in main's core suite; this PR does not touch either file. All 61 docs/contract tests pass locally on this head. AI-assisted.
aegish-zagi reviewed 2026-11-28 22:48:07 +00:00
aegish-zagi left a comment
No description provided.
Independent review (Linux, Python 3.12.3, AI-assisted) of head 2c96ab605c, merged with current main adfb3821a (`git merge-tree --write-tree` rc=0): - The diff is exactly one line in `docs/design.md`: only the `s_bfe_u32` / `s_bfe_i32` past-bit-31 row changes. I read the old and new rows side by side — every measured claim survives exactly once: gfx1150 (4,000 random control words), gfx1201/RDNA4 (10,000 programs, seed 500), RDNA2 gfx1035 (500/500 plus `int_hw_probe` wave32/64, SHADER-137), RDNA2 gfx1036 (6,000 of 6,000 across seeds 1–3 plus seed 4, 2,000 of 2,000), the `bfe_width` translator note, and the LLVM `constantFoldBFE` comparison. - What is dropped is only repetition (the duplicated Source sentences) and the stale closing `**RDNA2 is not measured**`, which contradicted the RDNA2 measurements in the same row. - The overlapping 64-bit scalar row is byte-identical to main, as the PR body says — its cleanup stays with #1450. - Tests on the merged state: `tests/test_design_contract_rows.py` 5 OK, every `tests/test_docs_*.py` file OK, `git diff --check` clean, `scripts/check_no_game_data.py docs/design.md` clean. No hardware claims re-measured (docs-only, none added). No blockers from this review.
zmasi commented 2026-11-29 00:08:15 +00:00

#2490 | head 2c96ab605ce74f92d917e714d070f94ddc3887d2 (merged cleanly onto origin/main 829530dbd0) | Windows 11 (10.0.26200.9974), Python 3.12.10 | AI-assisted: yes

Independent Verification (Windows 11)

  • Diff & safety audit: Inspected 100% of the diff (+1/-1 in docs/design.md line 497, s_bfe_u32 / s_bfe_i32 past bit 31 row). python -I scripts/check_no_game_data.py docs/design.md passed (rc=0).
  • Red -> Green on Windows 11 (origin/main 829530dbd0 vs #2490 + origin/main):
    • Red (origin/main): The s_bfe_u32 / s_bfe_i32 contract-table cell repeats the Source: measured on gfx1150 ... and tools/salu_diff.py --oracle hw,translator --bfe-any --programs 500 --seed 1 clauses and ends with stale **RDNA2 is not measured**; the ISA pseudocode does not say. contradicting the native RDNA2 gfx1035 and gfx1036 oracle measurements earlier in the same cell.
    • Green (#2490 + origin/main): Deduplicates the repeated clauses cleanly and removes the stale **RDNA2 is not measured** tail while preserving every gfx1150, gfx1201, gfx1035, gfx1036, bfe_width, and LLVM constantFoldBFE detail.
  • Validation & parser suites run on Windows 11:
    • Scoped tests/test_docs_links.py and tests/test_docs_cli_flags.py checks on docs/design.md -> 0 broken links or unknown CLI flags.
    • python -I tests/test_docs_design_rows.py (5/5), tests/test_docs_table_rows.py (2/2), tests/test_docs_repo_paths.py (5/5), tests/test_docs_encoding.py (1/1), tests/test_docs_list_items.py (3/3), and tests/test_docs_repeated_lines.py (3/3) -> all passed (OK).
    • python -I tools/progress_dashboard.py --out <tempdir> -> rc=0 (297 units, 4 metrics -> progress.html), confirming the dashboard collector parses the updated docs/design.md contract table cleanly.
#2490 | head 2c96ab605ce74f92d917e714d070f94ddc3887d2 (merged cleanly onto origin/main 829530dbd0) | Windows 11 (10.0.26200.9974), Python 3.12.10 | AI-assisted: yes ### Independent Verification (Windows 11) - **Diff & safety audit**: Inspected 100% of the diff (`+1/-1` in `docs/design.md` line 497, `s_bfe_u32` / `s_bfe_i32` past bit 31 row). `python -I scripts/check_no_game_data.py docs/design.md` passed (`rc=0`). - **Red -> Green on Windows 11 (`origin/main` `829530dbd0` vs `#2490 + origin/main`)**: - **Red (`origin/main`)**: The `s_bfe_u32` / `s_bfe_i32` contract-table cell repeats the `Source: measured on gfx1150 ...` and `tools/salu_diff.py --oracle hw,translator --bfe-any --programs 500 --seed 1` clauses and ends with stale `**RDNA2 is not measured**; the ISA pseudocode does not say.` contradicting the native RDNA2 `gfx1035` and `gfx1036` oracle measurements earlier in the same cell. - **Green (`#2490 + origin/main`)**: Deduplicates the repeated clauses cleanly and removes the stale `**RDNA2 is not measured**` tail while preserving every `gfx1150`, `gfx1201`, `gfx1035`, `gfx1036`, `bfe_width`, and LLVM `constantFoldBFE` detail. - **Validation & parser suites run on Windows 11**: - Scoped `tests/test_docs_links.py` and `tests/test_docs_cli_flags.py` checks on `docs/design.md` -> `0` broken links or unknown CLI flags. - `python -I tests/test_docs_design_rows.py` (`5/5`), `tests/test_docs_table_rows.py` (`2/2`), `tests/test_docs_repo_paths.py` (`5/5`), `tests/test_docs_encoding.py` (`1/1`), `tests/test_docs_list_items.py` (`3/3`), and `tests/test_docs_repeated_lines.py` (`3/3`) -> all passed (`OK`). - `python -I tools/progress_dashboard.py --out <tempdir>` -> `rc=0` (`297 units, 4 metrics -> progress.html`), confirming the dashboard collector parses the updated `docs/design.md` contract table cleanly.
timbot103 reviewed 2026-11-29 04:29:27 +00:00
timbot103 left a comment
No description provided.
Reviewed `2c96ab605` and found no issues. The 15,445-byte diff contains a single line replacement at `docs/design.md:497`. Six long context lines account for 11,989 bytes of document text in the diff, which also shows the full old and new versions of the edited row. The reconstructed document matches the patch's postimage blob ID. The full old hunk matches the corresponding lines in the supplied main snapshot, and the separate 64-bit scalar bitwise row is byte-identical across the PR base, patch postimage, and supplied main. The row retains the gfx1150, gfx1201, gfx1035, and gfx1036 measurements, the `bfe_width` note, and the LLVM `constantFoldBFE` comparison. The edit removes the repeated source text and the stale closing sentence that contradicted the RDNA2 measurements. In `tools/rdna2spirv.py`, both constant and runtime controls use a five-bit offset and seven-bit width capped at `32 - offset`. The signed example extracts four bits and sign-extends `0xd` to `0xfffffffd`, with SCC set because the result is nonzero. I inspected `tests/test_docs_design_rows.py` and `tests/test_docs_table_rows.py`. The replacement keeps the same topic and two-cell shape, stays in the same contiguous table, and introduces no duplicate row. Static audit only. I ran no tests, builds, or GPU probes. AI-assisted.
OreoFR commented 2026-11-29 19:52:54 +00:00

Verified by OreoFR on macOS 27.2.1 (26B131), Apple M5, APFS, Python 3.12.16, main 0e8737f2a (merges cleanly; does not force a rebase of #2566 at cfd12b24f), PR head 2c96ab605 : docs only, doc tests green

  • Doc tests on main and on the merge: the 13 tests/test_docs_*.py + test_design_contract_rows, test_progress_dashboard, test_make_game_preflight (16 files): all OK on main, identical on the merge. Docs-only change, so no red is possible.
  • Diff: one docs/design.md row (s_bfe_u32 / s_bfe_i32 past bit 31) de-duplicated; content unchanged. No game data.

Verdict: READY (docs only)

AI-assisted: Claude Code

Verified by OreoFR on macOS 27.2.1 (26B131), Apple M5, APFS, Python 3.12.16, main 0e8737f2a (merges cleanly; does not force a rebase of #2566 at cfd12b24f), PR head 2c96ab605 : docs only, doc tests green - Doc tests on main and on the merge: the 13 `tests/test_docs_*.py` + `test_design_contract_rows`, `test_progress_dashboard`, `test_make_game_preflight` (16 files): all OK on main, identical on the merge. Docs-only change, so no red is possible. - Diff: one `docs/design.md` row (`s_bfe_u32` / `s_bfe_i32` past bit 31) de-duplicated; content unchanged. No game data. **Verdict: READY** (docs only) AI-assisted: Claude Code
MoonEyes commented 2026-11-29 21:12:54 +00:00

Merging. Head 2c96ab605 has red/green verdicts from reviewers other than the author (above), merges cleanly with main ed089a96a, does not force a rebase of #2566, and carries a claim ID. Remaining main CI reds (translator-tests mesh, semantic-tests f16) are pre-existing. Merged by MoonEyes.

AI-assisted (Claude Code).

Merging. Head `2c96ab605` has red/green verdicts from reviewers other than the author (above), merges cleanly with `main` `ed089a96a`, does not force a rebase of #2566, and carries a claim ID. Remaining main CI reds (`translator-tests` mesh, `semantic-tests` f16) are pre-existing. Merged by MoonEyes. AI-assisted (Claude Code).
Sign in to join this conversation.
No description provided.