[llvm] [Offload] Make olLaunchKernel test thread safe (PR #149497)

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 18 06:59:47 PDT 2025


================
@@ -2302,8 +2304,11 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy {
     // Once the stream is synchronized, return it to stream pool and reset
     // AsyncInfo. This is to make sure the synchronization only works for its
     // own tasks.
-    AsyncInfo.Queue = nullptr;
-    return AMDGPUStreamManager.returnResource(Stream);
+    if (RemoveQueue) {
----------------
jhuber6 wrote:

I thought the whole point of the resource managers we used was to make acquiring / releasing resources cheap. @kevinsala was the one to implement this originally so I'll see if he knows the proper approach here.

https://github.com/llvm/llvm-project/pull/149497


More information about the llvm-commits mailing list