[libc] Allow the RPC client to be initialized via a H2D memcpy
The RPC client must be initialized to set a pointer to the underlying buffer. This is currently done with the `reset` method which may not be ideal for the use-case. We want runtimes to be able to initialize this without needing to call a kernel. Recent changes allowed the `Client` type to be trivially copyable. That means we can create a client on the server side and then copy it over. To that end we take the existing externally visible symbol and initialize it to the client's pointer. Therefore we can look up the symbol and copy it over once loaded. No test currently, I tested with a demo OpenMP application but couldn't think of how to put that in-tree. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D153633
Loading
Please sign in to comment