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

Fix abort with HIP backend for ROCm 5.0.2 and beyond #4873

Merged
merged 2 commits into from
Mar 21, 2022

Conversation

dalg24
Copy link
Member

@dalg24 dalg24 commented Mar 14, 2022

The error message provided to Kokkos::abort was not printed when called on the device-side.
The changes proposed (using __assert_fail instead of printf followed by abort) seem to do the charm with ROCm 5.0.2
Unfortunately there is no "native" macro we can use to guard the workaround in the unit tests so I just added a comment. We could in principle do that at configuration time but I was a bit hesitant because it is hacky and we haven't done it for any of the toolchains yet.

@dalg24 dalg24 requested a review from Rombur March 14, 2022 18:59
Comment on lines +60 to +61
const char empty[] = "";
__assert_fail(msg, empty, 0, empty);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be guarded by a check for HIP_VERSION since we only require 4.5.0?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function exists in 4.5.0 but only starting with 5.0.2 the message is printed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIP version was the same for ROCm 5.0.0 and 5.0.2 on Crusher

@dalg24 dalg24 merged commit 9a0fbc6 into kokkos:develop Mar 21, 2022
@dalg24 dalg24 deleted the hip_abort branch March 21, 2022 13:58
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.

None yet

4 participants