[all-commits] [llvm/llvm-project] 31c154: [libc] Allow the RPC client to be initialized via ...

Joseph Huber via All-commits all-commits at lists.llvm.org
Mon Jun 26 08:41:49 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 31c154881c5f1e59f29443778cb9d583a10c9578
      https://github.com/llvm/llvm-project/commit/31c154881c5f1e59f29443778cb9d583a10c9578
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2023-06-26 (Mon, 26 Jun 2023)

  Changed paths:
    M libc/src/__support/RPC/rpc.h
    M libc/src/__support/RPC/rpc_client.cpp
    M libc/utils/gpu/server/rpc_server.cpp
    M libc/utils/gpu/server/rpc_server.h

  Log Message:
  -----------
  [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




More information about the All-commits mailing list