[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 17:24:06 PDT 2023


jhuber6 marked an inline comment as done.
jhuber6 added inline comments.


================
Comment at: libc/src/__support/OSUtil/gpu/io.cpp:27
+        [](rpc::Buffer *) {});
+}
+
----------------
jdoerfert wrote:
> Why is this function unused? (also braces for the loop).
> Let's avoid "print" for now and go with fputs and exit first.
> We certainly want fputs to be the fast path for fprintf, and the non-f versions can be resolved on the device.
It's the function to use the return value from the server. Since this is void there's nothing to use. In the future this should be "asynchonrous" where we don't wait for the return value.


================
Comment at: libc/src/__support/RPC/rpc.h:30
+struct Buffer {
+  uint64_t data[8];
+};
----------------
jdoerfert wrote:
> Since data[0] is supposed to be the Opcode, should we not make it a  opcode member and then 7 * 8 bytes payload?
> 
I'm wondering if we should provide a bunch of structs that outline the structure of the arguments and just reinterpret case the underlying buffer to that struct type.


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