-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add a resource with custom allocator #230
base: develop
Are you sure you want to change the base?
Conversation
adayton1
commented
Jul 19, 2023
- This is an experimental resource that could make RAJA allocations thread safe and stream aware
|
||
GPU_TEST(CudaUmpireResource, AllocatorConstructor) | ||
{ | ||
auto& rm = umpire::ResourceManager::getInstance(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@neelakausik, essentially you will need to create a device pool, a pinned pool, and a unified memory pool per thread, then use those to create a resource per thread. The call to init_care_for_testing() above creates a GPU wide pool called "DEVICE_POOL" and another pool called "PINNED_POOL". Those should be the basis for the per thread device and pinned memory pools. On line 53 I create a GPU wide unified memory pool called "UM_POOL". You will need to create that manually in whatever test cases you have, then have that allocator be the basis for the per thread unified memory pool.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should test out this functionality in standalone CARE. Write some tests and benchmarks that involve RAJA reducers, scans, and CARE loops.