[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
Tue Apr 25 08:26:05 PDT 2023
jhuber6 updated this revision to Diff 516819.
jhuber6 added a comment.
Update some names and allocate the proper amount of memory.
Also this adds a hack to work around a problem with the optimizer. The GPU
executes groups of threads in SIMD style. This means that basic blocks turn into
thread masks. THe problem was occuring when the optimizer would sink the common
'close()` call to release the thread lock until after another open call within
the same lane. This can be seen in this https://godbolt.org/z/cfEr4n5TE. There
is some ongoing work to make this actually work on AMD but for now it's a hack
to prevent these function calls from being merged. It has a performance penalty,
but it's minor.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148943/new/
https://reviews.llvm.org/D148943
Files:
libc/src/__support/RPC/CMakeLists.txt
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/Loader.h
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.516819.patch
Type: text/x-patch
Size: 19184 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230425/4eefc531/attachment-0001.bin>
More information about the libc-commits
mailing list