-
Notifications
You must be signed in to change notification settings - Fork 198
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
Mark optional CUDA runtime functions as weak symbols #895
Mark optional CUDA runtime functions as weak symbols #895
Conversation
Will make it easier to support other compilers
cudaDevAttrMemoryPoolsSupported only checks that the driver supports cudaMemPools, not that the runtime does as well.
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.
Looks great! Needs a review from a real RMM expert but these are just my $0.02.
#if CUDART_VERSION >= 11020 // 11.2 introduced cudaMallocAsync | ||
#define RMM_CUDA_MALLOC_ASYNC_SUPPORT | ||
|
||
#ifndef RMM_WEAK_ATTRIBUTE |
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.
Maybe a comment is worth it here to explain what's going on?
|
||
// We first need to check if the runtime version supports cudaMemPool | ||
// before checking that the driver does. | ||
int version = 0; |
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.
My personal style would be to break out these checks (driver + runtime) into a helper function like cuda_malloc_async_available
() to simplify the constructor and encapsulate these annoying details. However, it is only used one place, so I can certainly live with this as well.
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.
It's a good idea considering #889 may cause duplication of the checks.
Closing this PR as the weak symbol approach is non-viable for all supported platforms |
No description provided.