[llvm] [Offload] Make olLaunchKernel test thread safe (PR #149497)
Ross Brunton via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 5 08:04:44 PDT 2025
================
@@ -75,6 +76,9 @@ struct __tgt_async_info {
/// should be freed after finalization.
llvm::SmallVector<void *, 2> AssociatedAllocations;
+ /// Mutex to guard access to AssociatedAllocations
+ std::mutex AllocationsMutex;
----------------
RossBrunton wrote:
I'm not sure if it's useful to have two different "modes" for this. Either libomptarget should support multithreading entirely (in which case it should be implemented) or it's not supported (in which case the mutex is a no-op).
https://github.com/llvm/llvm-project/pull/149497
More information about the llvm-commits
mailing list