[all-commits] [llvm/llvm-project] 667c10: [libc] Fix the implementation of exit on the GPU
Joseph Huber via All-commits
all-commits at lists.llvm.org
Thu Jun 29 11:22:43 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 667c10353e87d2be5b981cdac0a698c93946cc92
https://github.com/llvm/llvm-project/commit/667c10353e87d2be5b981cdac0a698c93946cc92
Author: Joseph Huber <jhuber6 at vols.utk.edu>
Date: 2023-06-29 (Thu, 29 Jun 2023)
Changed paths:
M libc/docs/gpu/support.rst
M libc/src/__support/OSUtil/gpu/quick_exit.cpp
M libc/utils/gpu/server/rpc_server.cpp
Log Message:
-----------
[libc] Fix the implementation of exit on the GPU
The RPC calls all have delays associated with them. Currently the `exit`
function does an async send and immediately exits the GPU. This can have
the effect that the RPC server never sees the exit call and we continue.
This patch changes that to first sync with the server before continuing
to perform its exit. There is still a hazard here, where the kernel can
complete before the RPC call reads back its response, but this is simply
multi-threaded hazards. This change ensures that the server *will*
always exit some time after the GPU exits.
Reviewed By: JonChesterfield
Differential Revision: https://reviews.llvm.org/D154112
More information about the All-commits
mailing list