[libc-commits] [libc] [libc] Rework the RPC interface to accept runtime wave sizes (PR #80914)

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Wed Feb 7 10:55:07 PST 2024


================
@@ -264,33 +277,35 @@ template <bool Invert, typename Packet> struct Process {
 /// Invokes a function accross every active buffer across the total lane size.
 template <uint32_t lane_size>
 static LIBC_INLINE void invoke_rpc(cpp::function<void(Buffer *)> fn,
-                                   Packet<lane_size> &packet) {
+                                   Buffer *slot, uint64_t mask) {
----------------
jhuber6 wrote:

The packet used to contain the mask, now it's passed in. It's the exact same value. When we open a port we record the thread mask that was used so that the server knows not to touch the unused slots.

Right now it's sort of a precondition that the mask here matches the implicit execution mask, unfortunately you can't static assert that.

https://github.com/llvm/llvm-project/pull/80914


More information about the libc-commits mailing list