-
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
CMake: Only show GPU architectures with enabled corresponding backend #5119
Conversation
How does this work with SYCL on NVIDIA? |
You have to use |
ok sounds good |
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.
I would prefer TRUE -> 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.
looks good
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.
the cmake_parse_arguments
suggestion is minor and don't mind if it's not adopted. I think adding the FORCE
parameter is important for dependent options because we may want other force values than OFF
cmake/kokkos_functions.cmake
Outdated
LIST(APPEND KOKKOS_OPTION_TYPES BOOL) | ||
SET(KOKKOS_OPTION_TYPES ${KOKKOS_OPTION_TYPES} PARENT_SCOPE) | ||
|
||
CMAKE_DEPENDENT_OPTION(${CAMEL_NAME} ${DOCSTRING} ${DEFAULT} "${DEPENDENCY}" OFF) |
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.
we should have a FORCE
argument so the api is the same as cmake_dependent_option
@@ -57,7 +57,46 @@ FUNCTION(kokkos_option CAMEL_SUFFIX DEFAULT TYPE DOCSTRING) | |||
# Make sure this appears in the cache with the appropriate DOCSTRING | |||
SET(${CAMEL_NAME} ${DEFAULT} CACHE ${TYPE} ${DOCSTRING}) | |||
|
|||
#I don't love doing it this way because it's N^2 in number options, but cest la vie | |||
#I don't love doing it this way because it's N^2 in number options, but c'est la vie |
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.
thanks for adding a fix to the missing '
it was really bugging me :P
Following a discussion in the meeting yesterday, we use cmake_dependent_option for the architecture options to only show GPU architectures in
ccmake
if the corresponding backend is enabled (or we configure withKokkos_ENABLE_UNSUPPORTED_ARCHS=ON
). This should make theCMake
option a little less overwhelming.