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

Clearer error message and HIP architectures #293

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

td-mpcdf
Copy link
Contributor

  • In the macros.h file, the error message is added to the error code.
  • We use the CMAKE_HIP_ARCHITECTURES variable to set the hip architecture for AMD GPUs.

Copy link
Contributor

@germasch germasch left a comment

Choose a reason for hiding this comment

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

Looks good, but I have some minor nit picks ;)

Comment on lines +204 to +205
#set(GPU_TARGETS "${HIP_GPU_ARCHITECTURES}"
# CACHE STRING "GPU targets to compile for")
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you just remove these two lines? I guess it looks like GPU_TARGETS isn't being used at all currently, right?

Comment on lines +93 to +96
hipError_t last_error = hipGetLastError();
if (last_error != hipSuccess) {
fprintf(stderr, "launch failed %s %d, error_code: %d\n", file, line,last_error);
fprintf(stderr, "(%s)\n", hipGetErrorString(last_error));
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks good, except that clang-format complains, so please update the formatting.

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.

2 participants