The allocator interface added in D97883 allows the RTL to allocate shared and
host-pinned memory from the cuda plugin. This patch adds support for these to
the runtime.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Two nits, otherwise this looks sensible to me.
| openmp/libomptarget/plugins/common/MemoryManager/MemoryManager.h | ||
|---|---|---|
| 34 | can we have an enum not a int32_t, also variable name Kind | |
| openmp/libomptarget/plugins/cuda/src/rtl.cpp | ||
| 363 | if everything but alloc_host goes to cumemfree, only put alloc_host in the set. If it is not in the set, it's cumemfree teritory. | |
Looks good (with one naming nit)
| openmp/libomptarget/plugins/cuda/src/rtl.cpp | ||
|---|---|---|
| 301 | Can you rename AllocKinds to something like HostPinnedAllocs? AllocKinds does not make sense anymore after the latest change. | |
| openmp/libomptarget/plugins/cuda/src/rtl.cpp | ||
|---|---|---|
| 327 | Sorry, where is the def of "cuMemAllocHost"? I didn't find it. | |
| openmp/libomptarget/plugins/cuda/src/rtl.cpp | ||
|---|---|---|
| 327 | ||
| openmp/libomptarget/plugins/cuda/src/rtl.cpp | ||
|---|---|---|
| 364 | cuMemFreeHost needs to be added to dynamic_cuda/cuda.h. Possibly other functions too, don't have this building successfully yet | |
can we have an enum not a int32_t, also variable name Kind