Repository navigation
docs/design.md: name the GPU fixtures of six atomics rows (DOC-GPU-VERIFIED-ATOMICS) - #413
Conversation
8e345c2 to
61d11f4
Compare
…RIFIED-ATOMICS)
Six contract rows ended with "Not GPU-verified" although fixtures on main
already run them through scripts/run_gpu_tests.py and check.py:
cs_lds_atomics_ext, cs_lds_xchg64_ext, cs_global_mem_ext, cs_w32_fcmpswap
and cs_w32_new_ops. Each row now names its fixture, the forms and cases it
compares, the GPUs it passed on (Radeon 610M, RADV Mesa 26.2.6; RTX 4070 Ti,
620.70.06), and what stays unchecked.
Rows: 8/16-bit global stores and d16 loads, ds_cmpst_f32 / fcmpswap,
ds_mskor, ds_{inc,dec,rsub}_u32 / ds_{min,max}_f32, ds_wrxchg2_rtn_b32,
ds_and/or/xor_b64. Row 279 also gets back the opening ** of its
"Hardware-measured natively on gfx1100" note.
Left out: Global atomics (32-bit) and buffer_atomic_{and,or,xor,swap}_x2,
which open pull requests ProjectLeonida#191 and ProjectLeonida#174 rewrite.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… six atomics rows (DOC-GPU-VERIFIED-ATOMICS)
… page with ProjectLeonida#522's ds_mskor row The keep-both resolution of ProjectLeonida#522's conflict also restored main's copies of the ds_{inc,dec,rsub}, ds_wrxchg2 and ds_mskor rows that ProjectLeonida#413 had edited (test_design_contract_rows, test_docs_design_rows). The page is now the one before the merge with ProjectLeonida#522's ds_mskor row in place, which keeps ProjectLeonida#413's GPU-fixture note, marked as measured on the earlier two-atomic emission. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
61d11f4 to
cf3951e
Compare
|
Reviewed cf3951e: docs-only; all five cited fixtures exist on main and match |
…(DOC-GPU-VERIFIED-ATOMICS) Since a672a59, cs_w32_fcmpswap reads the word at byte 0x48 back after buffer_atomic_fcmpswap, so out[7] checks that a NaN in memory and as CMP leaves the NaN in memory (no match). It no longer checks the glc return. The row described the older fixture. Rerun at main 6261ca9 on the RTX 4070 Ti (NVIDIA 620.70.06), native and with LEONIDA_W64_EMULATE=1: PASS, all eight words exact. The NaN post-state is credited to the 4070 Ti only. "Whether a NaN matches" leaves the Not GPU-verified list, and the value returned for a NaN joins it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
@PierreEbele Thanks, you're right. My runs on the 610M and the 4070 Ti were at Fixed in 457bad1, a follow-up on top of Rerun of
AI-assisted (Claude Code). |
Brings the branch up to date with main 68d1331. No conflicts; the merged tree was tested before the push (every standalone test file under tests/ passes except tests/test_ci_registration.py, which fails on main alone since ProjectLeonida#930). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Rechecked 457bad1: the Recommendation: Merge |
Fourteen commits main gained after ProjectLeonida#968: ProjectLeonida#413, ProjectLeonida#1114, ProjectLeonida#1090 and ProjectLeonida#1491. Two conflicts, both in the shader check lists: scripts/run_gpu_tests.py imports both sides' cases, and tests/test_shader_checks.py counts eight cases next to COMPUTE (main's cs_w32_salu_ext) and ProjectLeonida#939's IMAGE_STORE_CASES table in place of main's fixed seven store shaders. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Local stand-in for this pull request's CI, which has been queued here since 22:31 UTC (about 580 runs waiting). Tested:
Docs only: the The two pytest failures are Not covered: the Windows and macOS jobs. Setup: Linux (CachyOS), Python 3.14.10 (CI uses 3.12), llvm-mc 23.1.4 (CI uses 19), Node 26.13.1. GPU suite on lavapipe from Mesa 26.2.6 with AI-assisted (Claude Code). |
Claimed in the coordination issue as: DOC-GPU-VERIFIED-ATOMICS (#14 (comment))
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 in 6b5fc7f, 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: docs/design.md: one copy of each rule in the Global atomics row (stitched again after #3084) #191 and rdna2spirv: global_atomic_add/sub_x2 and buffer_atomic_add/sub_x2 #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 GPU test cs_w32_pk_rel_ext: packed 16-bit ints, v_swaprel, s_movrels, ds_or/xor_b64 #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