-
Notifications
You must be signed in to change notification settings - Fork 72
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
unify CUDA/HIP function calls/types #940
Merged
BenjaminW3
merged 1 commit into
alpaka-group:develop
from
psychocoderHPC:topic-unifyCudaHipFunctions
Mar 6, 2020
Merged
unify CUDA/HIP function calls/types #940
BenjaminW3
merged 1 commit into
alpaka-group:develop
from
psychocoderHPC:topic-unifyCudaHipFunctions
Mar 6, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
psychocoderHPC
commented
Mar 2, 2020
psychocoderHPC
force-pushed
the
topic-unifyCudaHipFunctions
branch
2 times, most recently
from
March 2, 2020 10:49
03153be
to
e5d3819
Compare
sbastrakov
suggested changes
Mar 2, 2020
sbastrakov
reviewed
Mar 2, 2020
psychocoderHPC
force-pushed
the
topic-unifyCudaHipFunctions
branch
from
March 3, 2020 08:45
e5d3819
to
8aaf2f1
Compare
sbastrakov
previously approved these changes
Mar 3, 2020
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.
Great!
psychocoderHPC
force-pushed
the
topic-unifyCudaHipFunctions
branch
from
March 4, 2020 10:49
8aaf2f1
to
d962d11
Compare
- add macro `ALPAKA_API_PREFIX()` to refix functions and types - add helper `ALPAKA_PP_CONCAT()` to construct `make_cudaPitched()` - reduce duplicated runtime error checks for CUDA/HIP
psychocoderHPC
force-pushed
the
topic-unifyCudaHipFunctions
branch
from
March 5, 2020 09:10
d962d11
to
65d4ecd
Compare
ready to merge |
sbastrakov
approved these changes
Mar 6, 2020
@BenjaminW3 should we wait for your review of this PR? To me looks good to be merged. |
BenjaminW3
approved these changes
Mar 6, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a follow up of #928 to remove most code duplication between CUDA/HIP.
ALPAKA_API_PREFIX()
to refix functions and typesALPAKA_PP_CONCAT()
to constructmake_cudaPitched()
I discussed with @sbastrakov if it is better to use a predefined list of function pointer/function objects or a macro to prefix the functions and types. Using a macro was at the end prepared by us to avoid that we need to maintain a global list of functions and types we are using.
It is also not clear about runtime overhead or compatibility when we use function objects. Function objects avoid inlining and the side effect to separable compile for CUDA and HIP is not clear.