[all-commits] [llvm/llvm-project] 10ade3: [libc] Rework slab cache data structure for GPU al...
Joseph Huber via All-commits
all-commits at lists.llvm.org
Thu Mar 5 10:30:30 PST 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 10ade366508d3fac4a769e3ca93e657edf491e94
https://github.com/llvm/llvm-project/commit/10ade366508d3fac4a769e3ca93e657edf491e94
Author: Joseph Huber <huberjn at outlook.com>
Date: 2026-03-05 (Thu, 05 Mar 2026)
Changed paths:
M libc/src/__support/GPU/CMakeLists.txt
M libc/src/__support/GPU/allocator.cpp
A libc/src/__support/GPU/fixedbuffer.h
R libc/src/__support/GPU/fixedstack.h
M libc/test/integration/src/__support/GPU/CMakeLists.txt
A libc/test/integration/src/__support/GPU/fixedbuffer_test.cpp
R libc/test/integration/src/__support/GPU/fixedstack_test.cpp
Log Message:
-----------
[libc] Rework slab cache data structure for GPU allocator
Summary:
This was previously a Trieber stack, which is a perfectly fine generic
and lock-free data structure. However, this used some expensive CAS
operations and had issues with ABA. Because the only user of this was
the slab cache mechanism, we can pretty safely specialize it. Instead,
we simply search a fixed size buffer for some sentinal values and CAS
into it.
For allocations that only ever hit the cache, this improves performance
from ~9000 cycles to ~6000 cycles and similar improvements for workloads
that feel the pain of small thread counts hitting the cache.
Commit: 454863b4404ce1470a40a93bb6442c3fe6628bc7
https://github.com/llvm/llvm-project/commit/454863b4404ce1470a40a93bb6442c3fe6628bc7
Author: Joseph Huber <huberjn at outlook.com>
Date: 2026-03-05 (Thu, 05 Mar 2026)
Changed paths:
M clang/lib/Headers/gpuintrin.h
Log Message:
-----------
[Clang] Fix 'gpuintrin.h' implementation of 'match_all'
Summary:
This implementation only worked if the lane mask passed in was uniform,
but this is against the expected usage where the user may be wishing to
check if a value is uniform *within* a mask subset. Also remove
redundant sync_lanes, the ballots and shuffles already have
synchronizing behavior.
Compare: https://github.com/llvm/llvm-project/compare/5b064a2c168c...454863b4404c
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list