[all-commits] [llvm/llvm-project] 134401: [Offload] Move RPC server handling to a dedicated ...

Joseph Huber via All-commits all-commits at lists.llvm.org
Fri Jan 24 09:37:08 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 134401deea5e86d646bb99fab39c182cfa8e5292
      https://github.com/llvm/llvm-project/commit/134401deea5e86d646bb99fab39c182cfa8e5292
  Author: Joseph Huber <huberjn at outlook.com>
  Date:   2025-01-24 (Fri, 24 Jan 2025)

  Changed paths:
    M offload/plugins-nextgen/amdgpu/src/rtl.cpp
    M offload/plugins-nextgen/common/include/RPC.h
    M offload/plugins-nextgen/common/src/PluginInterface.cpp
    M offload/plugins-nextgen/common/src/RPC.cpp
    M offload/plugins-nextgen/cuda/dynamic_cuda/cuda.cpp
    M offload/plugins-nextgen/cuda/dynamic_cuda/cuda.h
    M offload/plugins-nextgen/cuda/src/rtl.cpp
    A offload/test/libc/server.c

  Log Message:
  -----------
  [Offload] Move RPC server handling to a dedicated thread (#112988)

Summary:
Handling the RPC server requires running through list of jobs that the
device has requested to be done. Currently this is handled by the thread
that does the waiting for the kernel to finish. However, this is not
sound on NVIDIA architectures and only works for async launches in the
OpenMP model that uses helper threads.

However, we also don't want to have this thread doing work
unnnecessarily. For this reason we track the execution of kernels and
cause the thread to sleep via a condition variable (usually backed by
some kind of futex or other intelligent sleeping mechanism) so that the
thread will be idle while no kernels are running.



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