[libc-commits] [PATCH] D145913: [libc] Add initial support for an RPC mechanism for the GPU

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Mar 14 14:04:33 PDT 2023


jhuber6 marked 3 inline comments as done.
jhuber6 added inline comments.


================
Comment at: libc/src/__support/RPC/rpc.h:7
+//
+//===----------------------------------------------------------------------===//
+
----------------
jdoerfert wrote:
> file comment how this is going to work.
> 
> Also add a web documentation document
File comment is good. I'll documentation online in a later patch.


================
Comment at: libc/src/__support/RPC/rpc.h:20
+enum Opcode : uint64_t {
+  noop = 0,
+  print = 1,
----------------
jdoerfert wrote:
> reserve it, don't call it noon now.
How about `null`? I think it's important that `0` doesn't do anything as we expect that to be the default clean state of this buffer.


================
Comment at: libc/src/__support/RPC/rpc.h:83
+
+template <typename W, typename C> bool Server::run(W work, C clean) {
+  bool in = inbox->load(cpp::MemoryOrder::RELAXED);
----------------
jdoerfert wrote:
> maybe handle, or query?
Handle would probably be good, since I decided to make this non-blocking to make it more versatile on the server-side.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145913/new/

https://reviews.llvm.org/D145913



More information about the libc-commits mailing list