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

Open
github-bot wants to merge 2 commits from github-bot/gh-665 into main AGit
Owner

@⁠LouisRiverstone on GitHub · 2026-11-24 11:18 UTC · original
LouisRiverstone:carry-old-9923 → main · +5 −4 · 2 files · 2 commits · open

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

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 (21625bca8) 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)
**@⁠LouisRiverstone** on GitHub · 2026-11-24 11:18 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/665) `LouisRiverstone:carry-old-9923` → `main` · +5 −4 · 2 files · 2 commits · open Claimed in the coordination issue as: OLD-9923 (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) 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` (21625bca8) 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 - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] 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)
- 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:14:55 +00:00
Author
Owner

@⁠MoonEyes on GitHub · 2026-11-24 13:56 UTC · original

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).

**@⁠MoonEyes** on GitHub · 2026-11-24 13:56 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/665#issuecomment-7133581436) 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).
Author
Owner

@⁠tiguan26 on GitHub · 2026-11-25 19:37 UTC · original · approved these changes

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).

**@⁠tiguan26** on GitHub · 2026-11-25 19:37 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/665#pullrequestreview-6063834652) · **approved these changes** 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).
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/665/head:github-bot/gh-665'
git switch 'github-bot/gh-665'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-665'
git switch 'github-bot/gh-665'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-665'
git switch 'github-bot/gh-665'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-665'
git switch 'main'
git merge --squash 'github-bot/gh-665'
git switch 'main'
git merge --ff-only 'github-bot/gh-665'
git switch 'main'
git merge 'github-bot/gh-665'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.