[libc-commits] [PATCH] D148943: [libc] Enable multiple threads to use RPC on the GPU

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Apr 21 10:03:36 PDT 2023


jhuber6 created this revision.
Herald added subscribers: libc-commits, kosarev, mattd, asavonic, ecnelises, kerbowa, tschuett, jvesely.
Herald added projects: libc-project, All.
jhuber6 requested review of this revision.

The execution model of the GPU expects that groups of threads will
execute in lock-step in SIMD fashion. It's both important for
performance and correctness that we treat this as the smallest possible
granularity for an RPC operation. Thus, we map multiple threads to a
single larger buffer and ship that across the wire.

This patch makes the necessary changes to support executing the RPC on
the GPU with multiple threads. This requires some workarounds to mimic
the model when handling the protocol from the CPU. I'm not completely
happy with some of the workarounds required, but I think it should work.

Uses some of the implementation details from D148191 <https://reviews.llvm.org/D148191>, reworking the core state
handling pending.

Depends on D148810 <https://reviews.llvm.org/D148810>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D148943

Files:
  libc/src/__support/OSUtil/gpu/quick_exit.cpp
  libc/src/__support/RPC/rpc.h
  libc/src/__support/RPC/rpc_util.h
  libc/startup/gpu/amdgpu/start.cpp
  libc/startup/gpu/nvptx/start.cpp
  libc/test/integration/startup/gpu/CMakeLists.txt
  libc/test/integration/startup/gpu/rpc_test.cpp
  libc/utils/gpu/loader/Server.h
  libc/utils/gpu/loader/amdgpu/Loader.cpp
  libc/utils/gpu/loader/nvptx/Loader.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148943.515813.patch
Type: text/x-patch
Size: 16616 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230421/98d14d7e/attachment-0001.bin>


More information about the libc-commits mailing list