-
Notifications
You must be signed in to change notification settings - Fork 69
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
[hip] Fix C++14 test compilation with hip-clang. #99
Conversation
- Work around C++14 test compilation issue due to `constexpr` automarking with `__host__` and `__device__` in HIP-Clang.
This is a workaround for HIP-Clang C++14 support. However, fixing that requires more efforts in clang trunk. |
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.
This PR only solves the issues in the tests. The users of the library are still impacted. The fix needs to be in the library.
@saadrahim unfortunatelly, that workaround needs applying case by case and there's no general solution. Also, that workaround is specific to stdlibc++. Other std c++ libraries may require different workarounds. |
@saadrahim to be more clear, the issue is not rocPRIM specific one. There's no need or no way to fix rocPRIM. That workaround must be placed at the beginning of the source to be c++14 compiled with hip-clang. Putting them in any header may not resolve the issue due to the order of header in the source file. Once a STL header is placed ahead of that rocPRIM header, the issue will remain. |
BTW, this change needs merging into |
The work around needs us to provide documentation for the users of the library. Maybe we need to have a github issue on a public facing site that explains why this was needed. I am not comfortable to release this type of code without explanation. |
constexpr
automarking with
__host__
and__device__
in HIP-Clang.