Skip to content

test(shader): split the global atomics test to keep it within CI's time limit - #688

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
adriadam10:test/global-atomics-ci-time
Oct 5, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
adriadam10:test/global-atomics-ci-time

Conversation

@adriadam10

Copy link
Copy Markdown
Collaborator

What

agc_driver_global_atomics (from #491) takes 29 s on main's Linux CI and 46 s cold on CI's lavapipe locally. It ran one kernel with all 28 atomics three times: wave32, wave64, and once more against a read-only range. Each dispatch recompiles, and CI's lavapipe (LLVM 20) is slow on BDA accesses.

It is now three tests. The opcodes, rows and checks are the same:

  • GlobalAtomics: the 13 32-bit global_atomic_* opcodes, 16 HW rows each, wave32.
  • GlobalAtomics64: the 11 _x2 opcodes, 16 HW rows each, wave32.
  • GlobalAtomicsLanes: the cases that depend on the lanes, as wave32 and wave64: flat_atomic_xor through a 64-bit VGPR address, the contended returning global_atomic_add (sum and distinct prefix sums), the non-returning global_atomic_or under a partial EXEC, and a per-lane non-returning add. Then the read-only dispatch, which must leave the range untouched.

The per-opcode rows depend only on each lane's own address and data, so they run as wave32 only. The wave64 path is still covered by the lanes test, on all 64 lanes. The read-only check used to run all 24 opcodes. Now it runs the lanes kernel, which has a new non-returning global_atomic_add_x2 (per-lane carry into the high dword), so both the 4-byte and the 8-byte write lookups of EmitBdaAtomic hit the read-only range. The add_x2 expected value is the 64-bit sum: add_x2 itself is among the HW-measured opcodes, but this new row was not run on HW.

Only tests change.

Tested

  • CI's lavapipe (Ubuntu Mesa 25.2.8, LLVM 20.1.2), cold with no shader cache: 5 s + 5 s + 4 s, was 46 s. RADV and local lavapipe: all three pass.
  • Negative checks from feat(shader): implement the integer flat and global atomics #491, run against all three tests: cmpswap operand order, x2 comparator offset, inc vs dec, signed vs unsigned min, EXEC ignored, glc return dropped, x2 data width: each one fails at least one of the three. Dropping note_bda_write is still not visible, as on main.
  • Linux (CachyOS, GCC, Release, BUILD_TESTING=ON): full build, ctest 287/290. agc_driver_pixel_helper_lanes, agc_driver_pixel_lds and agc_driver_pixel_lds_lane_slots also fail on main on this machine's RADV.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes

…me limit

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added the agc libSceAgc* label Oct 5, 2026
@oneandonlydean
oneandonlydean merged commit 7b1d7cc into boykopovar:main Oct 5, 2026
3 checks passed
@adriadam10
adriadam10 deleted the test/global-atomics-ci-time branch October 6, 2026 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants