[llvm] [Offload] Make olLaunchKernel test thread safe (PR #149497)
Ross Brunton via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 21 01:48:21 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) {
----------------
RossBrunton wrote:
Sure, but we still have the race condition. Tweaking the interface here allows us to have the lock cover a smaller section of code.
https://github.com/llvm/llvm-project/pull/149497
More information about the llvm-commits
mailing list