-
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
Remove Kokkos_ENABLE_CUDA_LDG_INTRINSIC option #5623
Conversation
e1b27d2
to
7d2b292
Compare
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.
Please discuss why it is OK to drop the KOKKOS_ENABLE_CUDA_LDG_INTRINSIC
macro
@@ -77,6 +77,7 @@ KOKKOS_INTERNAL_DISABLE_COMPLEX_ALIGN := $(call kokkos_has_string,$(KOKKOS_OPTIO | |||
KOKKOS_INTERNAL_DISABLE_DUALVIEW_MODIFY_CHECK := $(call kokkos_has_string,$(KOKKOS_OPTIONS),disable_dualview_modify_check) | |||
KOKKOS_INTERNAL_ENABLE_PROFILING_LOAD_PRINT := $(call kokkos_has_string,$(KOKKOS_OPTIONS),enable_profile_load_print) | |||
KOKKOS_INTERNAL_ENABLE_LARGE_MEM_TESTS := $(call kokkos_has_string,$(KOKKOS_OPTIONS),enable_large_mem_tests) | |||
# deprecated |
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 see that they are two other occurrences of us placing the # deprecated
comment on the line before but I am wondering if there is any good reason not to place it at the end of the line that defines the variable?
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 find it better visible to put it on a separate line (and that's also what #5608 does).
BUILD.md
Outdated
* Whether to use CUDA LDG intrinsics | ||
* BOOL Default: OFF | ||
* BOOL Default: 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.
Did we intentionally leave
kokkos/cmake/kokkos_enable_options.cmake
Line 34 in 7d2b292
KOKKOS_ENABLE_OPTION(CUDA_LDG_INTRINSIC OFF "Whether to use CUDA LDG intrinsics") |
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.
Yes, I was assuming that people if at all set Kokkos_ENABLE_CUDA_LDG_INTRINSIC=ON
and not Kokkos_ENABLE_CUDA_LDG_INTRINSIC=OFF
explicitly. Hence, I would only warn/error out of people set it to ON
(and that's why the "real" default should be OFF
). Any better suggestions?
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 option needs to only be defined if deprecated code 4 is ON. I am torn whether I would bother changing the documentation of what the default might be. I am leaning towards no.
I reverted it for it always to be defined (but not used). |
Did you consider defining it only if deprecated code 4 is ON? How likely is it that this macro is being used downstream? Did you check in Trilinos? etc. |
There really is no good reason why the macro would be used downstream, though; it should be purely internal. Anyway, the more important question is, of course, if we are OK with removing the option (and with it the |
I don't expect anyone is going to argue against removing an option for which we effectively ignore the value set by the user nor keep a dead branch in our code.
I tend to agree and don't expect one can do anything useful in user code based on whether that macro was defined or not. I would err on the side of caution and preserve the macro when deprecated code 4 is ON. |
cmake/KokkosCore_config.h.in
Outdated
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE_4 | ||
#define KOKKOS_ENABLE_CUDA_LDG_INTRINSIC // deprecated | ||
#endif | ||
|
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.
Belongs to <Kokkos_Macros.hpp>
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.
Also we only want to define it if CUDA is enabled.
BUILD.md
Outdated
* Whether to use CUDA LDG intrinsics | ||
* BOOL Default: OFF | ||
* BOOL Default: 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.
The option needs to only be defined if deprecated code 4 is ON. I am torn whether I would bother changing the documentation of what the default might be. I am leaning towards no.
cmake/kokkos_enable_options.cmake
Outdated
@@ -141,3 +141,11 @@ ENDIF() | |||
IF (KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE AND BUILD_SHARED_LIBS) | |||
MESSAGE(FATAL_ERROR "Relocatable device code requires static libraries.") | |||
ENDIF() | |||
|
|||
IF(KOKKOS_ENABLE_CUDA_LDG_INTRINSIC) |
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.
You would do KOKKOS_ -> Kokkos_
here if the option is conditionally declared.
cmake/kokkos_enable_options.cmake
Outdated
IF(KOKKOS_ENABLE_DEPRECATED_CODE_4) | ||
MESSAGE(DEPRECATION "Setting Kokkos_ENABLE_CUDA_LDG_INTRINSIC is deprecated. LDG intrinsics are always enabled.") | ||
ELSE() | ||
MESSAGE(FATAL_ERROR "Kokkos_ENABLE_DEPRECATED_CODE_4 must be set to use Kokkos_ENABLE_CUDA_LDG_INTRINSIC") |
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.
MESSAGE(FATAL_ERROR "Kokkos_ENABLE_DEPRECATED_CODE_4 must be set to use Kokkos_ENABLE_CUDA_LDG_INTRINSIC") | |
MESSAGE(FATAL_ERROR "Kokkos_ENABLE_CUDA_LDG_INTRINSIC has been removed. LDG intrinsics are always enabled.") |
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.
Please confirm that you meant to define the option regardless of whether deprecated code 4 is enabled or not
kokkos/cmake/kokkos_enable_options.cmake
Line 34 in 21d3e48
KOKKOS_ENABLE_OPTION(CUDA_LDG_INTRINSIC OFF "Whether to use CUDA LDG intrinsics") |
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.
Will merge as is and we will do a follow up if necessary
Related to #5621. Since #2156,
KOKKOS_ENABLE_CUDA_LDG_INTRINSIC
is always enabled and, hence,CudaTextureFetch
is unused.This pull request proposes to eventually remove the option and
CudaTextureFetch
since it hasn't been used in more than 3 years.