Open manopapad opened 4 years ago
All those headers are obviously internal header files to me. Clients of Legion and Realm should never need any of those header files. The make build system includes only the header files that should be user-facing in the installation.
What exactly does Lux need out of cuda_module.h
?
These are the offending lines: https://github.com/LuxGraph/Lux/blob/master/pagerank/pagerank_gpu.cu#L269-L277. Lux seems to be using Realm::get_runtime()
and Realm::RuntimeImpl::get_memory_impl
from realm/runtime_impl.h
(which is obviously internal), and Realm::Cuda::GPUFBMemory::alloc_bytes
and Realm::Cuda::GPUFBMemory::get_direct_ptr
from realm/cuda/cuda_module.h
in order to allocate GPU memory inside a task.
@streichler Will need to say if he wants to allow that for Realm clients, but I believe the the answer is that they should use the instance allocation interface in instance.h
and not be going through the side like that.
Since this is a Legion program, they should be using the DeferredBuffer
interface to allocate memory that is local to the task, which will go through the accepted Realm instance.h
interface.
I believe this memory is not task-local; it needs to persist for the lifetime of the app. Possibly the instance.h
interface, or the new Legion variable-size allocation API are proper ways to do this. I made a corresponding issue on the Lux bug tracker: https://github.com/LuxGraph/Lux/issues/10.
Reopening because I need to do a scrub of the Realm headers at least.
For completeness, I've officially vetted the list of Legion header files and guarantee that the ones the Make build currently installs are precisely the user facing ones, no more and no less. I've also been curating the Realm list to do the same thing, but it's possible that I've misinterpreted some header files.
Side question: do we want to create a related issue to teach the CMake build system to do the same thing? I find it annoying that CMake moves my internal header files into the 'include' directory so users can link against internal interfaces.
The following headers are not obviously project-internal (e.g. they're not named "foo_impl.h" or "foo_internal.h"), but are not included in the make-based install of Legion. We've come across at least one app (Lux) that was using one of them (realm/cuda/cuda_module.h), so I assume some of these are actually public and should be included in the install. Could the appropriate people take a look at this list and identify any missing public headers?