Skip to content

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

Open
thiefyzheng wants to merge 1 commit into
ProjectLeonida:mainfrom
thiefyzheng:fix/design-md-duplicated-rows
Open

thiefyzheng wants to merge 1 commit into
ProjectLeonida:mainfrom
thiefyzheng:fix/design-md-duplicated-rows

Conversation

@thiefyzheng

@thiefyzheng thiefyzheng commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: DOCS-DESIGN-DUPLICATED-ROWS (#1608 (comment)), 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.

@kawaii-shakal

Copy link
Copy Markdown
Contributor

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 43a9d56.


Generated by Claude Code

The s_bfe_u32/s_bfe_i32 past bit 31 row repeated its Source sentences and ended with a stale "RDNA2 is not measured" after its own RDNA2 measurements. Each measured claim is kept once; nothing new is measured. The independent 64-bit scalar bitwise cleanup is left to ProjectLeonida#1450.

AI-assisted (Claude Code).
@thiefyzheng
thiefyzheng force-pushed the fix/design-md-duplicated-rows branch from 37bcfbe to 2c96ab6 Compare November 28, 2026 21:00
@thiefyzheng thiefyzheng changed the title docs/design: de-duplicate two contract-table rows repeated by a bad merge docs/design: de-duplicate the s_bfe contract-table row Nov 28, 2026
@thiefyzheng

Copy link
Copy Markdown
Contributor Author

@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

Copy link
Copy Markdown
Contributor Author

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 aegish-zagi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review (Linux, Python 3.12.3, AI-assisted) of head 2c96ab6, merged with current main adfb382 (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

zmasi commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

#2490 | head 2c96ab6 (merged cleanly onto origin/main 829530d) | 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants