-
Notifications
You must be signed in to change notification settings - Fork 197
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
[IMP] move core CUDA RT macros to cuda_rt_essentials.hpp #1584
[IMP] move core CUDA RT macros to cuda_rt_essentials.hpp #1584
Conversation
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 good to me 👍.
do { \ | ||
cudaError_t const status = call; \ | ||
if (cudaSuccess != status) { \ | ||
printf("CUDA call='%s' at file=%s line=%d failed with %s\n", \ |
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.
One change request related to the header being self-standing. Can you add an include of cstdio
to the top of cuda_rt_essentials.hpp
?
This should have been done before, but probably escaped review.
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.
actually, nothing was directly using cstdio
in this file and cstdio
was only included transitively through core/error.hpp
for things like SET_ERROR_MSG
.
So all was actually good before (IMO), and I fixed the include here now since we now use cstdio
directly in this file.
Thanks for pointing it out !
This should be good to be merged |
/merge |
The reasoning behind this PR is as follows:
for now, anyone wanting to use
RAFT_CUDA_TRY_NO_THROW
still needs to includecudart_utils.hpp
which can be costly (compilation) due to the include ofmemory_pool.hpp
.By moving the macros to the essentials, we should not break anything for anyone, but allow anyone to improve compilation times by including the essentials only. At the same time, it should add minimal overhead to the compilation time of the essentials file since the pre-processor is (usually) fast compared to the rest of the compilation pipeline.