-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CP013: Remove polymorphic allocator #49
Comments
@AerialMantis @hcedwar How should we do this in |
@mhoemmen That's right, originally I was thinking that we remove the (taken from #52): We decided that for the purposes of affinity-based allocation it didn't make sense to use the pmr memory resource, however after separating the execution and memory topologies, I think the pmr memory resource could be a good choice to represent a node within the memory topology, even if that is then passed to a concrete affinity aware allocator type. Though I think we should (as @hcedwar suggested in #41) make it a type which is derived from the pmr memory resource so that it can be made iterable. If we were to go down this route perhaps the |
I think it makes sense. I would like to see something like a memory_context equivalent of the execution_context, but that would not be ready in time for the next meeting. |
@AerialMantis Sorry I'm a little late with this -- if we separate execution resource and execution context, then I think it makes sense also to separate memory resource and memory context. This would imply that the default allocator has an implicit memory resource, no? |
@mhoemmen @Ruyk sorry I missed this discussion earlier. Yes, I would agree, having a memory context would make sense, particularly in the case where you have discrete memory regions. Perhaps this could also help in supporting agent local storage as it could serve as the context which manages the allocation and lifetime of that memory. One thought that comes to mind, should a memory context be an allocator type itself such as a pmr allocator, or should it be a separate type which can produce allocators in the same way an execution context can produce executors? |
@AerialMantis wrote:
I think the former. The key distinction for me is between resource and context, not between context and allocator. The point of having a separate "memory resource" comparable to an "execution resource," would be to be able to use a subset of hardware resources for allocations. The "memory resource" would be the subset of hardware, and the "memory (/ allocation) context" would be the memory pool etc. The pmr allocators conflate context and allocator: one creates the various pool or monotonic buffer resources with an "upstream" memory "resource" (more like a context), but the pool / buffer resources have the same base class as their "upstream" resource. MPI (the Message Passing Interface for distributed-memory parallel programming) also separates resource and allocator, but conflates context and allocator:
(The "attach a void* allocation to an |
We decided that the polymorphic allocator does fit the requirements we have for affinity-based allocation, so we should drop the
pmr_memory_resource_type
from the paper and just leave theallocator_type
.The text was updated successfully, but these errors were encountered: