[libc-commits] [PATCH] D150456: [libc] Check the RPC server once again after the kernel exits

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri May 12 10:49:35 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG182e5acb1172: [libc] Check the RPC server once again after the kernel exits (authored by jhuber6).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150456/new/

https://reviews.llvm.org/D150456

Files:
  libc/utils/gpu/loader/amdgpu/Loader.cpp
  libc/utils/gpu/loader/nvptx/Loader.cpp


Index: libc/utils/gpu/loader/nvptx/Loader.cpp
===================================================================
--- libc/utils/gpu/loader/nvptx/Loader.cpp
+++ libc/utils/gpu/loader/nvptx/Loader.cpp
@@ -186,6 +186,10 @@
   while (cuStreamQuery(stream) == CUDA_ERROR_NOT_READY)
     handle_server();
 
+  // Handle the server one more time in case the kernel exited with a pending
+  // send still in flight.
+  handle_server();
+
   return CUDA_SUCCESS;
 }
 
Index: libc/utils/gpu/loader/amdgpu/Loader.cpp
===================================================================
--- libc/utils/gpu/loader/amdgpu/Loader.cpp
+++ libc/utils/gpu/loader/amdgpu/Loader.cpp
@@ -221,6 +221,10 @@
              /*timeout_hint=*/1024, HSA_WAIT_STATE_ACTIVE) != 0)
     handle_server();
 
+  // Handle the server one more time in case the kernel exited with a pending
+  // send still in flight.
+  handle_server();
+
   // Destroy the resources acquired to launch the kernel and return.
   if (hsa_status_t err = hsa_amd_memory_pool_free(args))
     handle_error(err);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150456.521719.patch
Type: text/x-patch
Size: 1055 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230512/dc7b0bdf/attachment.bin>


More information about the libc-commits mailing list