[libc-commits] [libc] [libc] Rework the RPC interface to accept runtime wave sizes (PR #80914)
Jon Chesterfield via libc-commits
libc-commits at lists.llvm.org
Wed Feb 7 10:26:24 PST 2024
================
@@ -144,6 +139,17 @@ template <bool Invert, typename Packet> struct Process {
atomic_thread_fence(cpp::MemoryOrder::ACQUIRE);
}
+ /// The packet is a linearly allocated array of buffers used to communicate
+ /// with the other process. This function returns the appropriate slot in this
+ /// array such that the process can operate on an entire warp or wavefront at
+ /// once.
+ LIBC_INLINE Buffer *get_packet(uint32_t index) {
+ if constexpr (lane_size == DEFAULT_LANE_SIZE)
+ return &packet[index * gpu::get_lane_size()];
+ else
+ return &packet[index * lane_size];
----------------
JonChesterfield wrote:
this is dubious. Just have the non-GPUs report a lane size of 1 and get rid of the DEFAULT_LANE_SIZE construct
https://github.com/llvm/llvm-project/pull/80914
More information about the libc-commits
mailing list