Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

mhbliao
Copy link
Contributor

@mhbliao mhbliao commented Sep 9, 2019

  • Work around C++14 test compilation issue due to constexpr
    automarking with __host__ and __device__ in HIP-Clang.

- Work around C++14 test compilation issue due to `constexpr`
  automarking with `__host__` and `__device__` in HIP-Clang.
@mhbliao
Copy link
Contributor Author

mhbliao commented Sep 9, 2019

This is a workaround for HIP-Clang C++14 support. However, fixing that requires more efforts in clang trunk.

Copy link
Member

@saadrahim saadrahim left a 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.

@mhbliao
Copy link
Contributor Author

mhbliao commented Sep 9, 2019

@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.

@mhbliao
Copy link
Contributor Author

mhbliao commented Sep 9, 2019

@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.

@mhbliao mhbliao closed this Sep 9, 2019
@mhbliao mhbliao reopened this Sep 9, 2019
@mhbliao
Copy link
Contributor Author

mhbliao commented Sep 9, 2019

BTW, this change needs merging into staging branch as well

@saadrahim
Copy link
Member

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.

@saadrahim saadrahim closed this Sep 10, 2019
@mhbliao mhbliao deleted the hliao/develop/swdev-201095 branch September 18, 2019 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants