mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:55:52 +01:00
[PR #394] [MERGED] tests: image atomics guard keeps a dynamic EXEC case #445
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#445
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/394
Author: @Okamizs
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @ubiquitarianism
Base:
main← Head:test-image-atomics-dynamic-exec📝 Commits (1)
b3eaa3dtests: image atomics guard keeps a dynamic EXEC case📊 Changes
1 file changed (+41 additions, -0 deletions)
View changed files
📝
tests/semantic/test_image_atomics_guard.py(+41 -0)📄 Description
Claimed in the coordination issue as: TEST-ATOMIC-GUARD follow-up (finding comment in #14)
What and why
Before: since #20 (by @wavehs),
find_guarded_texel_blockaccepts the foldedif (%true)guard when a shader never writes EXEC. Every case intest_image_atomics_guard.pyleaves EXEC alone, so all 49 subtests take that path and the check that a lane switched off at run time skips the image atomic was never exercised.After: a new test,
test_dynamic_exec_keeps_the_real_active_guard, switches lanes off before the atomic withv_cmp_gt_u32+s_and_saveexec_b32and withv_cmpx_gt_u32, coveringimage_atomic_add,swap,incandcmpswapon 2D and 3D images (16 subtests). Each case asserts the module stores to%activeand the atomic's block is entered through a branch on the loaded%active, then swaps that condition for%trueand asserts the helper rejects it.Test only: one file, 41 lines added. No translator change, so no new rule for
docs/design.md. Builds on #20 and does not change it. Stays off SHADER-1264: the EXEC writes here come from per-lane compares, not a computed SGPR value.Tested
python -m pytest tests/semantic/test_image_atomics_guard.py: before 49 subtests passed, after 65.exec_is_constant_truetoTruemakes the 16 new subtests fail while the old 49 still pass.python -I scripts/run_semantic_tests.py tests/semantic -j 4: 6103 tests before, 6104 after. The same 2 files failed in both runs (see limitations).python -m pytest tests/test_semantic_translator_use.py: 3 passed.Ran on the CPU only, in a Linux container with Python 3.13.
GPUs tested: n/a
Known limitations
spirv-asandspirv-valweren't installed locally, sotest_sopc_validationandtest_unary_f16_validationfailed before and after, and the new cases weren't run throughspirv-val. CI has SPIRV-Tools.spirv_wave_interp.pydoesn't model storage images yet.AI-assisted: yes (Claude helped write the test and this description)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.