-
Notifications
You must be signed in to change notification settings - Fork 407
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] Use hipcc architecture autodetection when Kokkos_ARCH is not set #3941
Conversation
I remember us running into some difficulties with cross-compiling if no architecture was specified. Does that work now? |
What do you mean? If there are no GPU on the node you are configuring, there is no way to detect the GPU architecture. That hasn't changed. |
I just checked that I don't get an error message with this patch if I don't provide an architecture and compile on a node without GPU. Trying to run on a GPU node then fails.
at run time. For auto-detection, I would rather follow the approach we are using for |
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.
IF(KOKKOS_COMPILER_ID STREQUAL HIPCC)
# CODE YOU ADDED
ELSE()
MESSAGE(SEND_ERROR ...)
ENDIF()
cmake/kokkos_arch.cmake
Outdated
@@ -433,8 +433,14 @@ CHECK_AMDGPU_ARCH(VEGA906 gfx906) # Radeon Instinct MI50 and MI60 | |||
CHECK_AMDGPU_ARCH(VEGA908 gfx908) | |||
|
|||
IF(KOKKOS_ENABLE_HIP AND NOT AMDGPU_ARCH_ALREADY_SPECIFIED) | |||
MESSAGE(SEND_ERROR "HIP enabled but no AMD GPU architecture currently enabled. " | |||
"Please enable one AMD GPU architecture via -DKokkos_ARCH_{..}=ON'.") | |||
FIND_PATH(ROCM_ENUMERATOR_PATH rocm_agent_enumerator) |
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.
Why did you chose this over find_program
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.
No good reason
MESSAGE(SEND_ERROR "HIP enabled but no AMD GPU architecture currently enabled. " | ||
"Please enable one AMD GPU architecture via -DKokkos_ARCH_{..}=ON'.") |
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.
Error message could be improved and indicate that auto detection failed
If no architecture is selected
hipcc
does the right thing.Closes #3933