docs/design.md: one copy of each rule in the Global atomics row (OLD-9923) #665
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/665"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by LouisRiverstone on 2026-11-24T11:18:49Z.
Claimed in the coordination issue as: OLD-9923 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7129925439)
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.mdhad 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 takesfcmpswapout of that row's Still Unsupported list, because it has its own row (pointed out by WALID1618Y on the old PR). The matching comment intools/rdna2spirv.pynow names inc/dec next to the other_x2forms. The row also gains one pointer sentence: natural alignment (an unaligned dword, or an unaligned 8-byte_x2element, leaves memory alone and an activeglclane gets 0) is in "Atomic natural alignment" below, which says the same, as does theglobal_atomicdocstring. 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 intools/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
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: documentation only)Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-24T13:56:52Z.
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, theglc/vdstrule, thecmpswappair,**Approximation:**,Still Unsupported,spirv-valandNot GPU-verifiedeach 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 brokendecformula on main (... ? DATA : M + 1, cut off mid-expression) is now whole and readsM - 1. The only changes in meaning remove stale or contradictory claims (inc/decand the float atomics listed as unsupported; "a bitwise op or an exchange leaves the same memory"), and theglobal_atomicdocstring agrees with both.fcmpswaphas 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.pyandtest_docs_table_ids.pypass on the PR head.AI-assisted review (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by tiguan26 on 2026-11-25T19:37:05Z.
Review: APPROVED
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 onlytest_int32_to_f64failing, as on main here.The new wording matches the code.
atomic_inc_dec_casexists on main and is the path inc/dec take, and the_x2inc/dec forms are correctly listed with the other unsupported 64-bit forms.AI-assisted (Claude).
Imported from ubiquitarianism/leonida. Originally posted by kawaii-shakal on 2026-11-27T19:14:25Z.
Checked against main
43a9d562: 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 twoCPU-checked by test_global_atomics.pysentences, of which the fuller one stays). The docstring change inGen.global_atomicmatches the code (atomic_inc_dec_cas,global_atomic_floatandfloat_cmpswap_loopexist 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
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-29T00:22:27Z.
Native Windows 11 Verification (
83f589e6fc) — PASSDiff-audited
docs/design.md(+1/-1) andtools/rdna2spirv.py(+4/-3) and verified Red -> Green merged ontoorigin/main(48bae6cad) on Windows 11 (10.0.26200, Python3.12.10with-I).Results
dec gives (M == 0 With glc...) in theGlobal atomicscontract row ofdocs/design.mdwhile preserving allinc/dec,fmin/fmax,_x2, and natural-alignment rules.Gen.global_atomic's docstring intools/rdna2spirv.pysoinc/dec(atomic_inc_dec_cas) andfmin/fmax(global_atomic_float) are no longer listed asUnsupported.PR #665merged ontoorigin/main):python -I tests/semantic/test_global_atomics.py:Ran 12 tests in 3.754s — OKpython -I tests/semantic/test_atomic_inc_dec.py:Ran 11 tests in 5.046s — OKpython -I tests/semantic/test_global_atomics_x2.py:Ran 4 tests in 1.086s — OKtests/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_list_items.py(3/3),tests/test_docs_repeated_lines.py(3/3),tests/test_docs_encoding.py(1/1),tests/test_text_write_line_endings.py(3/3), andscripts/check_no_game_data.py:OK.AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-29T01:13:16Z.
Checked
83f589e6fmerged (no commit) withmain87a39df94: Python 3.12.4, Windows 11 10.0.26300, CPU only.check_no_game_data.pyis clean.tools/rdna2spirv.pychange is a docstring, with no code change. The tests around the translator give the same result onmainand on the merge.tools/rdna2spirv.pyis one ofmake_game.py's translation sources. Even a docstring edit there changes the translator digest, so every port build translates all shaders again once after this lands.No blocker from my side.
AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T10:54:41Z.
Review: APPROVED
Reviewed
docs/design.mdand the docstring intools/rdna2spirv.py: cleanly removes the duplicated/corrupted text in theGlobal atomicsrow (dec gives (M == 0 With glc...), aligns theGen.global_atomicdocstring with the code, merges cleanly ontomain, and passes clean-room checks.Not merging immediately because editing
tools/rdna2spirv.pytriggered the full Runtime/CI suite on an older base where unrelated jobs failed (windows,linux-gpu-tools,translator-tests,stdlib-tests-linux,checkcancelled). Ready to merge once CI is re-run green on currentmain.(AI-assisted review.)