-
Notifications
You must be signed in to change notification settings - Fork 2
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
Initial HIP backend support #3
Conversation
Just so I don't forget before merging address #10 in here as well. |
src/SNLS_cuda_portability.h
Outdated
#if (defined(__CUDA_ARCH__) && (__CUDA_ARCH__ > 0)) || defined(__HIP_DEVICE_COMPILE__) | ||
#define __cuda_device_only__ | ||
#else | ||
#define __cuda_host_only__ |
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.
So, we should probably move to something more generic here like __gpu_device_only__
and __gpu_host_only__
and maybe add the snls
name some where in there as well just to avoid name clashing with other people's macros.
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.
Along a similar set of lines, it would also be good to update the device forall portion of the code.
Lots of different parts of the library referenced to either CUDA or HIP for things. Since, we're seeing more and more different GPU vendors come online it just made more sense to generalize things to be called gpu where possible. As part of this work, I renamed a number of the macros so that they would use SNLS in the name to avoid name clashing with other codes.
Note: the GPU single point test still has some CUDA specific stuff in it. I'm leaving it in there for now given it's being completely ripped out in #14 |
@gberg617 made a few small updates: 1 -> include Alan's bug fixes related to the device class so that wouldn't be sitting in the other branch/PR for too long |
Draft proposal to add in HIP support. This PR is currently just a way to easily keep track of what's changed when adding in the new HIP backend