[Openmp-commits] [PATCH] D94379: [OpenMP] Move memory manager to plugin and make it a common interface
Johannes Doerfert via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Sun Jan 10 17:21:04 PST 2021
jdoerfert added a comment.
This looks better.
We could make an interface, let memory manager and DeviceAllocatorTy implement it, and simply fill the "allocator list" with the appropriate ones. Unsure if that is preferable over the `if(UseMemoryManager)` conditional but it might be nicer to read.
Update the docs wrt. environment vars, and also look for the generic `LIBOMPTARGET_MEMORY_MANAGER_THRESHOLD`. Or only look for that one.
================
Comment at: openmp/libomptarget/plugins/cuda/src/rtl.cpp:456
+ }
+ }
}
----------------
Don't we always need to create the device allocators?
================
Comment at: openmp/libomptarget/plugins/cuda/src/rtl.cpp:464
+ for (auto &M : MemoryManagers)
+ M.release();
+
----------------
No need for the `if`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94379/new/
https://reviews.llvm.org/D94379
More information about the Openmp-commits
mailing list