[all-commits] [llvm/llvm-project] a1a8bb: [libc] Change RPC interface to not use device ids ...

Joseph Huber via All-commits all-commits at lists.llvm.org
Fri Mar 29 10:49:37 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a1a8bb1d3ae9a535526aba9514e87f76e2d040fa
      https://github.com/llvm/llvm-project/commit/a1a8bb1d3ae9a535526aba9514e87f76e2d040fa
  Author: Joseph Huber <huberjn at outlook.com>
  Date:   2024-03-29 (Fri, 29 Mar 2024)

  Changed paths:
    M libc/utils/gpu/loader/Loader.h
    M libc/utils/gpu/loader/amdgpu/Loader.cpp
    M libc/utils/gpu/loader/nvptx/Loader.cpp
    M libc/utils/gpu/server/llvmlibc_rpc_server.h
    M libc/utils/gpu/server/rpc_server.cpp
    M openmp/libomptarget/plugins-nextgen/common/include/RPC.h
    M openmp/libomptarget/plugins-nextgen/common/src/PluginInterface.cpp
    M openmp/libomptarget/plugins-nextgen/common/src/RPC.cpp

  Log Message:
  -----------
  [libc] Change RPC interface to not use device ids (#87087)

Summary:
The current implementation of RPC tied everything to device IDs and
forced us to do init / shutdown to manage some global state. This turned
out to be a bad idea in situations where we want to track multiple
hetergeneous devices that may report the same device ID in the same
process.

This patch changes the interface to instead create an opaque handle to
the internal device and simply allocates it via `new`. The user will
then take this device and store it to interface with the attached
device. This interface puts the burden of tracking the device identifier
to mapped d evices onto the user, but in return heavily simplifies the
implementation.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list