[all-commits] [llvm/llvm-project] 91f5f9: [OpenMP] Unconditionally provide an RPC client int...

Joseph Huber via All-commits all-commits at lists.llvm.org
Mon Dec 2 12:32:13 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 91f5f974cb75309a94c9efc76238ef98abcf1582
      https://github.com/llvm/llvm-project/commit/91f5f974cb75309a94c9efc76238ef98abcf1582
  Author: Joseph Huber <huberjn at outlook.com>
  Date:   2024-12-02 (Mon, 02 Dec 2024)

  Changed paths:
    M offload/DeviceRTL/CMakeLists.txt
    M offload/DeviceRTL/src/Misc.cpp
    M offload/DeviceRTL/src/exports
    A offload/include/Shared/RPCOpcodes.h
    M offload/plugins-nextgen/amdgpu/src/rtl.cpp
    M offload/plugins-nextgen/common/CMakeLists.txt
    M offload/plugins-nextgen/common/include/PluginInterface.h
    M offload/plugins-nextgen/common/src/PluginInterface.cpp
    M offload/plugins-nextgen/common/src/RPC.cpp
    M offload/plugins-nextgen/cuda/src/rtl.cpp
    A offload/test/api/omp_host_call.c
    R offload/test/libc/host_call.c

  Log Message:
  -----------
  [OpenMP] Unconditionally provide an RPC client interface for OpenMP (#117933)

Summary:
This patch adds an RPC interface that lives directly in the OpenMP
device runtime. This allows OpenMP to implement custom opcodes.
Currently this is only providing the host call interface, which is the
raw version of reverse offloading. Previously this lived in `libc/` as
an extension which is not the correct place.

The interface here uses a weak symbol for the RPC client by the same
name that the `libc` interface uses. This means that it will defer to
the libc one if both are present so we don't need to set up multiple
instances.

The presense of this symbol is what controls whether or not we set up
the RPC server. Because this is an external symbol it normally won't be
optimized out, so there's a special pass in OpenMPOpt that deletes this
symbol if it is unused during linking. That means at `O0` the RPC server
will always be present now, but will be removed trivially if it's not
used at O1 and higher.



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