-
Notifications
You must be signed in to change notification settings - Fork 103
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
Allocator Interface #1131
base: develop
Are you sure you want to change the base?
Allocator Interface #1131
Conversation
This looks great! Can we get example of how to use under the example folder? |
When you say you want the sizes to be user queryable, do you mean something like a pool size or what? Your fourth point should be possible, but querying size will likely either work only for a pool-like allocator or give a non-useful answer (for a lot of reasons, have a look at the docs on jemalloc usage functions for details). |
I agree, I think I'll drop the ability to query the size. Then expose something for only the internal RAJA pool allocators that supports querying the size in a similar manner to umpire pools. The user will be responsible for tracking the sizes of any user-provided allocators. |
That makes sense. Especially if you document the concept used to query the size so a user can implement it if they want to. |
7391d78
to
58943a0
Compare
Add an Allocator abstraction that looks similar to umpire. Use this abstraction in the cuda/hip backends. Refactor basic_mempool into AllocatorPool as the default cuda/hip Allocators. Add support for users to set new Allocators for cuda/hip.
This is a layer under Allocator that can provide stats. The idea is to allow users to expose stats for their allocators or not.
58943a0
to
e5d6aca
Compare
Add Allocator Interface that exposes more options and state to users.
Refactor our existing internal allocators to use an Allocator interface.
Add ability to set allocators with user defined Allocators.
Add ability to get individual allocators or all allocators in use.
Add ability to query allocator sizes.
Design review
On some date, we'll review this PR. We may discuss the design ideas:
This PR implements 1. 2. and 3. It leaves out 4. 5. 6. for the following reasons