Skip to content

docs/design.md: drop older copies that a newer sentence in the same row extends word for word - #4910

Open
LouisRiverstone wants to merge 4 commits into
ItsNotRexed:mainfrom
LouisRiverstone:docs-prefix-copies
Open

LouisRiverstone wants to merge 4 commits into
ItsNotRexed:mainfrom
LouisRiverstone:docs-prefix-copies

Conversation

@LouisRiverstone

Copy link
Copy Markdown
Contributor

More merge leftovers in docs/design.md, of the simplest and safest kind: an older, shorter copy of a sentence next to the newer one that starts with it word for word and adds to it. The shorter copy goes, and nothing is reworded.

row dropped copy (the kept one starts with it)
Buffer format stores the Z,Y,X,W red/blue exchange sentence, without its tail
Other additions the ps_gather_wrap.asm GPU-checked sentence, without its tail
Floating-point operations "tools/f32_fuzz.py and cs_fma_fused.asm are the tests that notice."
Output modifiers on hardware (gfx1150) the denorm_mode_32 = 0 sentence, without its tail
Scalar select and pack "Hardware-verified on RDNA2 (gfx1035 …, SCC kept)." (the kept one adds native gfx1036)
v_min3_f16 … "test_alu_min3_max3_med3_16_hw.py holds 540 of the measured words." (the kept one adds ALL_NAN_SRC0_SIGNALLING)
Swizzled buffer addressing "A literal word1 / word3 … folds each bit." (the kept one adds the run-time L = … selection)

Integer clamp also had two superseded claims next to the sentences that replaced them:

  • "CPU-checked by test_alu_u16_clamp.py …, not GPU-verified". The next sentence is the same one with the gfx1035 hardware verification.
  • "Open divergence measured on the same hardware: … the translator currently ignores clamp on these carry-out ops". The row's earlier sentence says this was fixed on 2026-11-22, and the code saturates D there (tools/rdna2spirv.py, the v_add_co_u32 … branch, OpSelect … carry … 0xFFFFFFFF).

Both go.

How the rows were picked: a script listed every row where a sentence of at least 40 characters is a prefix of a longer sentence in the same row. I read each hit, and Integer clamp's two contradictions were checked against the code by hand. Rows already in #3637, #4879, #4891, #4899 and #4903 are left alone.

Checked:

  • each row keeps its column count, and no unescaped | is added
  • the tests/test_docs_*.py checks pass

Docs only, no game files. Claimed on #4816 before starting.

AI-assisted (Claude Code): I reviewed and ran the checks.

…ow extends word for word

Seven rows kept an older, shorter copy of a sentence next to the newer one that
starts with it word for word and adds to it (Buffer format stores, Other
additions, Floating-point operations, Output modifiers on hardware (gfx1150),
Scalar select and pack, v_min3_f16..., Swizzled buffer addressing); the
shorter copy goes. Integer clamp also had 'CPU-checked ..., **not
GPU-verified**' next to the same sentence with its gfx1035 hardware
verification, and an 'Open divergence: the translator currently ignores clamp
on the carry-out ops' next to the sentence saying that was fixed on
2026-11-22; the code saturates there (the v_add_co_u32 branch), so both stale
sentences go. No behaviour change.
@tupacfan04

Copy link
Copy Markdown
Contributor

PASS. All nine dropped fragments were checked: seven are exact word-for-word prefixes of the surviving longer sentence (the tail adds newer evidence), so no rule is lost. The two clamp contradictions also check out against the code - tools/rdna2spirv.py:7964-7966 saturates D on carry while keeping the real carry in sdst, so "the translator currently ignores clamp" is stale, and "not GPU-verified" is superseded by the same row's gfx1035 verification.

Survivors are newest: MEASURED = 540 tuples and ALL_NAN_SRC0_SIGNALLING = 8 rows in tests/semantic/test_alu_min3_max3_med3_16_hw.py; the run-time swizzle L exists (tools/rdna2spirv.py:2990,3041); every cited file exists. Docs tests 32, compileall and diff-check clean, merge clean (fast-forward).

One miss under the PR's own >=40-char-prefix rule: docs/design.md:253 (EXEC row) still has a superseded pair - "...share the same path but were not measured separately." twice, glued as separately.; also GPU-verified on native RDNA2 .... Worth one more sweep.

Approve. AI-assisted review, docs only.

@memorypressure

Copy link
Copy Markdown

Merged into current main (3faac55): all six docs guards pass and every removal is a true duplicate — the sentence-level diff shows in all eight rows the newer copy that stays carries the same facts and citations (u16 clamp result, carry-out sdst, the gather/fma/denorm/probe/16-bit-minmax references, the swizzle fold). The dropped translator-ignores-clamp clause is correctly stale — the same row records the 2026-11-22 fix. Coordination: #4913 and #4909 touch other rows of the same table but collide on adjacent lines (verified pairwise) — whoever merges second needs a rebase. CI pending. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run).

@kapitche

Copy link
Copy Markdown
Contributor

Tested 0213692 merged with main 3faac55 (clean merge) on Linux (WSL2, CPython 3.12.16): pass.

  • tests/test_docs_*.py: all 10 files OK, 0 failed. tests/semantic/test_alu_add_co_clamp.py: 4 run, 4 passed.
  • A script over the 8 changed rows (git diff -U0): 7 rows lose exactly one sentence, and each dropped sentence is a prefix of a surviving longer sentence in the same row. Removing it from the old row gives the new row exactly. Pipe count per row is unchanged (3 before, 3 after).
  • Integer clamp row: the dropped "not GPU-verified" copy is followed by the same sentence with the gfx1035 verification. The dropped "Open divergence" sentence is stale on main: tools/rdna2spirv.py (~7962-7967) emits OpSelect that saturates D on carry/borrow when clamp is set, and the row's earlier sentence already says it was fixed on 2026-11-22.
  • Negative control: docs only, so the docs tests pass on main too. Nothing run natively on Windows.

@LouisRiverstone

Copy link
Copy Markdown
Contributor Author

Thanks @memorypressure and @kapitche (who also re-checked the dropped clamp clause against tools/rdna2spirv.py ~7962-7967). Same as on #4913: if they collide, I'll rebase whichever lands second.

@LouisRiverstone

Copy link
Copy Markdown
Contributor Author

Merged current main. One of the eight rows, "Other additions", had already been fixed on main (the stale S# clause is gone there), so the PR now changes seven rows. The rest kept main's new text: the "Typed buffer formats" reference in "Buffer format stores", for one. The docs tests pass.

@InduwaraSMPN

Copy link
Copy Markdown

Checked 5e769b5b (code read + doc tests, Windows 11 x64, CPython 3.12.12, no GPU, no game files): pass.

This is the safe kind of dedupe the body describes: in each affected row the kept sentence starts word-for-word with the dropped one and adds to it, so nothing is reworded and no fact is lost. I spot-checked the Buffer format stores / Buffer stores / Other additions rows against the diff and the kept text remains the longer form.

Ran on the head:

  • python -I tests/test_docs_links.py — 7 passed.
  • python -I scripts/check_no_game_data.py — exit 0.
  • git diff --check — clean.

AI-assisted (OpenCode).

@kapitche

Copy link
Copy Markdown
Contributor

Tested 5e769b5 merged with main 8575d36 on Linux (WSL2) / Python 3.12.16: concern
The real merge conflicts in docs/design.md, in 3 hunks: the Geometry shaders and Integer clamp rows, the Output modifiers on hardware (gfx1150) and Wave64 handling rows, and the 8/16-bit MUBUF d16 loads and stores and Swizzled buffer addressing rows. Main has changed these same rows since the PR's last merge of main.
I aborted the merge and ran no tests on the merged tree. The dedup needs redoing against current main's text of those rows.

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.

5 participants