mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:20:51 +01:00
[PR #413] [MERGED] docs/design.md: name the GPU fixtures of six atomics rows (DOC-GPU-VERIFIED-ATOMICS) #464
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#464
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/413
Author: @milk4sale
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @ubiquitarianism
Base:
main← Head:docs/gpu-verified-atomics📝 Commits (3)
cf3951edocs/design.md: name the GPU fixtures of six atomics rows (DOC-GPU-VERIFIED-ATOMICS)457bad1docs/design.md: match the fcmpswap NaN clause to the current fixture (DOC-GPU-VERIFIED-ATOMICS)4581d0aMerge main into docs/gpu-verified-atomics📊 Changes
1 file changed (+6 additions, -6 deletions)
View changed files
📝
docs/design.md(+6 -6)📄 Description
Claimed in the coordination issue as: DOC-GPU-VERIFIED-ATOMICS (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7122360796)
Depends on: #186, #65 - conflicts only; nothing here builds on them. #186 edits the
ds_wrxchg_rtn_b64row, which sits between two rows changed here, and #65 inserts its Flat memory row right after the 8/16-bit global row. Both resolve by keeping both sides.What and why
Six contract rows in
docs/design.mdended with "Not GPU-verified.", but GPU fixtures onmainalready run them throughscripts/run_gpu_tests.pyandruntime/test/shaders/check.py, and no row named its fixture. Each row now names its fixture, says which forms and cases it compares and on which GPUs it passed, and keeps a Not GPU-verified: list of what is still unchecked. Docs only: six lines of one file.cs_global_mem_extglobal_store_shortat byte 3 (both dwords),global_load_sbyte_d16_hids_cmpst_f32,global_/buffer_atomic_fcmpswapcs_w32_fcmpswapds_cmpst_rtn_f32−0/+0 match and NaN no-match,ds_cmpst_f32no-match,buffer_atomic_fcmpswap−0/+0 match withglcand a one-ulp no-match withoutglobal_atomic_fcmpswap, theds_cmpst_f32match, a NaN in the buffer form, bounds, inactive lanes, contentionds_mskor_b32/_rtn_b32cs_lds_atomics_extoffset:, the 32-lane caseds_{inc,dec,rsub}_u32,ds_{min,max}_f32cs_lds_atomics_ext,cs_lds_xchg64_extds_inc_rtn_u32wrap,ds_dec_u32from 0,ds_rsub_u32wrap (low byte of each),ds_min_f32with a qNaN,ds_max_rtn_f32−0/+0 (as an XOR)offset:, inactive lanes, contentionds_wrxchg2_rtn_b32cs_w32_new_opsdata1in LDSdata0,st64, one dword twice, aliasingds_and/or/xor_b64cs_lds_atomics_ext,cs_lds_xchg64_extds_xor_rtn_b64,ds_and_b64,ds_or_rtn_b64(the element only)ds_and_rtn_b64,ds_or_b64,ds_xor_b64,offset:, aliasing, contentionThe coverage comes from the fixture bodies, not only their headers. Three things the headers don't say:
cs_w32_new_opsoverwrites the second VGPR ofds_wrxchg2_rtn_b32'svdstwith a read before storing it.cs_w32_fcmpswap's NaNbuffer_atomic_fcmpswapcase stores only the returned word, which is the NaN whether or not it matched.cs_lds_xchg64_extnever storesds_or_rtn_b64's returned pair, and judgesds_max_rtn_f32as the word left XOR the returned word.Row 279 also gets back the opening
**of "Hardware-measured natively ongfx1100", lost in6b5fc7fc8, so GitHub no longer prints a stray**there. That row had two "Not GPU-verified" clauses (a later merge added the second); the first goes.Left out or affected:
buffer_atomic_{and,or,xor,swap}_x2: #191 and #174 rewrite those rows.cs_global_mem_extalso covers parts of them (global_atomic_add/cmpswap,global_atomic_or_x2,buffer_atomic_xor_x2), so they can take the same kind of note once those land.cs_w32_late_ext,ds_mskor) and #171 (cs_w32_pk_rel_ext,ds_or/xor_b64) add fixtures for two of these rows without editing them; the rows can name those fixtures once they merge.Tested
On
mainece4ba5b3plus this commit (since rebased ond2cd6c0d9, whose ten new commits change only runtime C++ tests, not the translator, the fixtures ordocs/design.md), CachyOS (kernel 7.3.3), llvm-mc 23.1.4, SPIRV-Tools v2026.4, GCC 16.2.1, implicit Vulkan layers off (VK_LOADER_LAYERS_DISABLE=~implicit~).scripts/run_gpu_tests.py --filter <fixture>for each of the five fixtures, withLEONIDA_VK_DEVICEchoosing the GPU (checked againstvk_compute_test'sdevice:line):LEONIDA_W64_EMULATE=1With
LEONIDA_W64_EMULATE=1the translator writes byte-identical SPIR-V for all five (one active lane, no cross-lane operation), so the emulated runs repeat the native test. That is why the rows name only the GPUs.Also:
tests/test_docs_links.py,tests/test_docs_design_rows.pyandtests/test_design_contract_rows.pypass;scripts/check_no_game_data.py docs/design.mdis clean. The translator suite andctestwere not run, since no code changed.GPUs tested: AMD Radeon 610M (gfx1036), RADV Mesa 26.2.6, CachyOS Linux; NVIDIA GeForce RTX 4070 Ti, 620.70.06, CachyOS Linux.
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (No new rule: this names existing fixtures.)🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.