Skip to content

test(shader): keep the flat cache bits test within CI's time limit - #677

Merged
boykopovar merged 1 commit into
boykopovar:mainfrom
adriadam10:test/flat-cache-bits-ci-time
Oct 5, 2026
Merged

boykopovar merged 1 commit into
boykopovar:mainfrom
adriadam10:test/flat-cache-bits-ci-time

Conversation

@adriadam10

Copy link
Copy Markdown
Collaborator

What

agc_driver_flat_cache_bits (from #495) takes 113 s on main's Linux CI and goes past the 120 s ctest timeout on PR runs: #545, #593, #668 and #672 fail on it with (Timeout) and nothing else. CI's lavapipe (LLVM 20) spends about 3 s compiling each BDA access per shader and wave size. The old kernel had 19 of them and ran twice (wave32 and wave64).

The test now runs one wave32 kernel with 5 BDA accesses, each with glc slc dlc:

  • global_load_dwordx2 and flat_load_dword (loads, global and flat segment)
  • global_store_dword and flat_store_dword (stores)
  • returning global_atomic_add (glc keeps the pre-op return, with slc set)

It checks the 4 results per lane and the final 16 bytes per lane against values measured on HW, and that nothing else in the 64 KiB guest block changes. The cache bits don't depend on the lane, so one wave size is enough. The decoder condition and the translation paths that #495 changed are the same for every data size, so dropping the sub-dword and per-bit rows doesn't lose a case those paths can tell apart.

Only the test changes.

Tested

  • HW (Radeon 660M, gfx1035, same VMEM encoding as gfx1013): the new kernel over 32 rows (edge values plus random) matches the model 32/32, on fine-grained and on coarse-grained memory. The test's expected values are these HW rows.
  • CI's lavapipe (Ubuntu Mesa 25.2.8, LLVM 20.1.2), cold with no shader cache: 9 s, was 120 s. RADV: passes.
  • Negative checks still fail the test: cache bits still rejected by the decoder, slc dropping the atomic return, a dlc store skipped.
  • Linux (CachyOS, GCC, Release, BUILD_TESTING=ON): full build, ctest 285/288. 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

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added the agc libSceAgc* label Oct 5, 2026
@NumberGuan NumberGuan mentioned this pull request Oct 5, 2026
8 tasks done
@boykopovar
boykopovar merged commit 0518f0e into boykopovar:main Oct 5, 2026
3 checks passed
@adriadam10
adriadam10 deleted the test/flat-cache-bits-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