Skip to content

docs/design.md: one copy of each rule in the Global atomics row (OLD-9923) - #665

Open
LouisRiverstone wants to merge 2 commits into
ProjectLeonida:mainfrom
LouisRiverstone:carry-old-9923
Open

LouisRiverstone wants to merge 2 commits into
ProjectLeonida:mainfrom
LouisRiverstone:carry-old-9923

Conversation

@LouisRiverstone

@LouisRiverstone LouisRiverstone commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: OLD-9923 (#14 (comment))

Replaces the carried-over draft #191. I'm the original author of old upstream PR 9923.

What and why

The Global atomics row in docs/design.md had been stitched together twice, the second time after old PR 3084, so some rules appeared twice in it. This keeps one copy of each. It also takes fcmpswap out of that row's Still Unsupported list, because it has its own row (pointed out by WALID1618Y on the old PR). The matching comment in tools/rdna2spirv.py now names inc/dec next to the other _x2 forms. The row also gains one pointer sentence: natural alignment (an unaligned dword, or an unaligned 8-byte _x2 element, leaves memory alone and an active glc lane gets 0) is in "Atomic natural alignment" below, which says the same, as does the global_atomic docstring. No behaviour change.

The old branch's final diff, applied on current main (21625bc) as one commit. It applied cleanly.

Tested

  • python -m compileall -q tools: OK (only a comment changed in tools/rdna2spirv.py).
  • python -I scripts/run_semantic_tests.py tests/semantic: 465 files, 6108 tests, 0 files failed (Linux, Python 3.14.4).

GPUs tested: n/a

AI-assisted: yes (Claude Code)

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a: documentation only)

…ched again after old PR 3084)

- docs/design.md: one copy of each rule in the Global atomics row (stitched again after #3084)
- docs/design.md: fcmpswap is not in Global atomics' Still Unsupported list; it has its own row (@WALID1618Y on old PR 4879)

Carried over from old-pr/9923 (old upstream PR 9923), rebased on main.
@MoonEyes

Copy link
Copy Markdown
Collaborator

Checked the Global atomics row (docs/design.md:289) fact by fact against origin/main. Every rule of the old cell is now there exactly once (Until 2026-11-22, CPU-checked by, the glc/vdst rule, the cmpswap pair, **Approximation:**, Still Unsupported, spirv-val and Not GPU-verified each went from 2 or 3 copies to 1). The copies kept are the most complete ones: all three test files, and the exchange-tearing approximation. The broken dec formula on main (... ? DATA : M + 1, cut off mid-expression) is now whole and reads M - 1. The only changes in meaning remove stale or contradictory claims (inc/dec and the float atomics listed as unsupported; "a bitwise op or an exchange leaves the same memory"), and the global_atomic docstring agrees with both. fcmpswap has its own row (line 417). The confirmation methods are unchanged (CPU tests, spirv-val, not GPU-verified).

One note: the PR also adds a pointer sentence to the "Atomic natural alignment" row. It is accurate (row 515 and the code docstring say the same), but the description does not mention it.

The table still has two columns on lines 288 to 290. tests/test_docs_design_rows.py, test_docs_repeated_lines.py, test_docs_table_rows.py and test_docs_table_ids.py pass on the PR head.

AI-assisted review (Claude Code).

@tiguan26 tiguan26 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.

Approving. It changes docs only: the docstring and the design row. Merged into current main (9f9a7c5) with no conflicts, and the full translator suite gives 491 files / 6,312 tests with only test_int32_to_f64 failing, as on main here.

The new wording matches the code. atomic_inc_dec_cas exists on main and is the path inc/dec take, and the _x2 inc/dec forms are correctly listed with the other unsupported 64-bit forms.

AI-assisted (Claude).

@kawaii-shakal

Copy link
Copy Markdown
Contributor

Checked against main 43a9d56: merges cleanly (also with #1450 and #1224). The Global atomics row keeps every rule; what goes are older copies a later sentence extends (for example the two CPU-checked by test_global_atomics.py sentences, of which the fuller one stays). The docstring change in Gen.global_atomic matches the code (atomic_inc_dec_cas, global_atomic_float and float_cmpswap_loop exist in main). Doc tests pass with the three merged.

AI-assisted (Claude Code); I ran the checks and read the diff.


Generated by Claude Code

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