Repository navigation
asahi/libagx: use 256-thread workgroups for libagx_fill_uint4 - #1270
Merged
Merged
Conversation
libagx_copy_uint4 already uses 256-thread workgroups, while libagx_fill_uint4 still used 32-thread workgroups (8x more workgroup launches for large buffer fills). Raising libagx_fill_uint4 to KERNEL(256) improves gpubench copy.bw kind=fill at depth 4 on M6 (G18G B1) from 122.4 GB/s (548.2 us/submit) to 127.2 GB/s (527.4 us/submit, +3.9%). Signed-off-by: Liam J LiamRay11/LiamRay10 <228416644+LiamRay11@users.noreply.github.com>
|
Exact-head
|
satchlj
approved these changes
Nov 28, 2026
satchlj
left a comment
Member
There was a problem hiding this comment.
Reviewed and tested at exact HEAD 0df1e19b9174 on Apple M5 Max (J775c, G17C B1, Borealis, -Db_ndebug=false):
- Clean 1-line
KERNEL(32)->KERNEL(256)change onlibagx_fill_uint4. meson test --suite asahi: 337/337 OK, 0 FAIL.- Vulkan CTS
dEQP-VK.api.fill_and_update_buffer.suballocation.fill_buffer*: 20/20 supported PASS (0 FAIL, 2 NotSupported, 0 GPU faults).
|
Merge-train landing at
Revert: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Raise
libagx_fill_uint4insrc/asahi/libagx/copy.clfromKERNEL(32)toKERNEL(256)to matchlibagx_copy_uint4, reducing workgroup launch count by 8x for large buffer fills.Benchmarks
Hardware: Apple M6 (
G18G B1) — same-machine A/B usinggpubench-vk(warmup_ms=300,runs=5,run_ms=250):Command:
gpubench-vk --filter '^copy\.bw$' --param kind=fill --warmup-ms 300 --runs 5 --run-ms 250copy.bw kind=fill(D=4)122.4 GB/s127.2 GB/scopy.bw kind=fill(D=4)us_per_submit548.2 us527.4 usVerification
G18G B1):dEQP-VK.api.fill_and_update_buffer.suballocation*24/24 supported PASS (0 failures),vtrun.sh100% PASS.