[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:25:40 PST 2024


================
@@ -43,22 +43,13 @@ struct Header {
   uint16_t opcode;
 };
 
-/// The data payload for the associated packet. We provide enough space for each
-/// thread in the cooperating lane to have a buffer.
-template <uint32_t lane_size = gpu::LANE_SIZE> struct Payload {
-  Buffer slot[lane_size];
-};
-
-/// A packet used to share data between the client and server across an entire
-/// lane. We use a lane as the minimum granularity for execution.
-template <uint32_t lane_size = gpu::LANE_SIZE> struct alignas(64) Packet {
-  Header header;
-  Payload<lane_size> payload;
-};
-
 /// The maximum number of parallel ports that the RPC interface can support.
 constexpr uint64_t MAX_PORT_COUNT = 4096;
 
+/// The default lane size indicates that the actual lane size is not a compile
+/// time constant and needs to be instead be queried from the platform.
+constexpr uint32_t DEFAULT_LANE_SIZE = 0;
+
----------------
jhuber6 wrote:

Naming is hard, it's supposed to imply that it's not a value that can go in a template.

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


More information about the libc-commits mailing list