[llvm] [Offload] Update allocations to include device (PR #154733)
Kevin Sala Penades via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 29 17:46:58 PDT 2025
================
@@ -124,8 +125,8 @@ struct OffloadContext {
bool TracingEnabled = false;
bool ValidationEnabled = true;
- DenseMap<void *, AllocInfo> AllocInfoMap{};
- std::mutex AllocInfoMapMutex{};
+ SmallVector<AllocInfo> AllocInfoList{};
----------------
kevinsala wrote:
Is it necessary to have the allocations of all devices in the same structure? I couldn't find a use for that requirement in the current code.
If it's not necessary, you could have a map in each device object with their own allocations. Keeping a map to speedup lookups, and improving concurrency between operations of distinct devices.
https://github.com/llvm/llvm-project/pull/154733
More information about the llvm-commits
mailing list