-
Notifications
You must be signed in to change notification settings - Fork 90
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 more CUDA and HIP files into common #1516
Conversation
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
TBH, I'm not sure if this can be reviewed by humans. 200+ changed files are not easily processed manually. So I guess we have to rely on our CI. If you could provide some key files to look at, that would help a lot. |
@MarcelKoch Most of these changes are 90% automatical, but the remaining 10% is what's interesting. I'll see what I can do in terms of providing a diff what changed beyond the automated stuff. I reviewed a similar PR in the past using |
Perhaps the easiest is if you already know where the 10% interesting stuff is, you could just give us a list of files and then we can manage. |
I had to do so many small changes, I can't really remember, I'll have to reproduce that in an automated fashion |
TBH, I'm not sure if the places where you did manual changes are that important. AFAIK the changes are mostly code movement, with the addition of perhaps some wrappers around the moved code. And I'm somewhat confident that our CI would catch errors on that level. If there are any changes besides that, it would be good to know if you can point us to those. |
Some of the changes handle inconsistencies between CUDA and HIP versions, some of which might have performance implications, so I don't want to just rely on CI here. |
@MarcelKoch I agree, that would be my next goal |
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.
two left in my mind: preconditioner/jacobi_common.hpp and header guard
#endif | ||
|
||
|
||
#include <thrust/tuple.h> |
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.
when it becomes the header, it needs the header guard
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.
The file is not self-sufficient without the unified/kernel_launch.hpp
header, just like before, so it does not need one.
Co-authored-by: Yuhsiang M. Tsai <[email protected]>
The % in the computation gets misinterpreted by the printf used as a fallback for GKO_ASSERT
Co-authored-by: Yu-Hsiang M. Tsai <[email protected]>
This reverts commit a0f5a82.
Quality Gate passedIssues Measures |
This moves most of the CUDA and HIP source files into common/cuda_hip Related PR: ginkgo-project#1516
A lot of the files we have in
common/cuda_hip
don't work standalone, but instead require to be included with certain other includes being available. Here I'm trying to change this, allowing the files to be parsed from tooling more easily, and making it easier to write CUDA and HIP code simultaneously.I did many of these modifications automatically using the
unify_cuda_hip.py
python script, or using plain text replacement to fix the headersSome related questions:
What should be the canonical place of includinghip_runtime.h
? I don't think we should have to do that with every file, instead something likeconfig.hip.hpp
ortypes.hip.hpp
seems most appropriatehip::config
be used on host or device or both? If we use it on the device only, we should be able to handle ROCm gfx10 and gfx11 not supported #1429 more easily, the host side should instead be handled with a runtime value, likeexec->get_warp_size()