Skip to content

Commit

Permalink
Fix definitions and docs to remove CUDA Lambda option
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilMiller committed May 3, 2023
1 parent ddded0e commit 4470284
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 22 deletions.
4 changes: 0 additions & 4 deletions .jenkins
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ pipeline {
-DKokkos_ENABLE_DEPRECATED_CODE_4=OFF \
-DKokkos_ENABLE_TESTS=ON \
-DKokkos_ENABLE_CUDA=ON \
-DKokkos_ENABLE_CUDA_LAMBDA=ON \
-DKokkos_ENABLE_OPENMP=ON \
.. && \
make -j8 && ctest --verbose'''
Expand Down Expand Up @@ -313,7 +312,6 @@ pipeline {
-DKokkos_ENABLE_TESTS=ON \
-DKokkos_ENABLE_BENCHMARKS=ON \
-DKokkos_ENABLE_CUDA=ON \
-DKokkos_ENABLE_CUDA_LAMBDA=ON \
-DKokkos_ENABLE_TUNING=ON \
-DKokkos_ARCH_VOLTA70=ON \
.. && \
Expand Down Expand Up @@ -386,7 +384,6 @@ pipeline {
-DKokkos_ENABLE_COMPILER_WARNINGS=ON \
-DKokkos_ENABLE_OPENMP=OFF \
-DKokkos_ENABLE_CUDA=ON \
-DKokkos_ENABLE_CUDA_LAMBDA=OFF \
-DKokkos_ENABLE_CUDA_UVM=ON \
-DKokkos_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE=ON \
-DKokkos_ENABLE_DEPRECATED_CODE_3=ON \
Expand Down Expand Up @@ -453,7 +450,6 @@ pipeline {
-DKokkos_ENABLE_TESTS=ON \
-DKokkos_ENABLE_BENCHMARKS=ON \
-DKokkos_ENABLE_CUDA=ON \
-DKokkos_ENABLE_CUDA_LAMBDA=ON \
-DKokkos_ENABLE_LIBDL=OFF \
.. && \
make -j8 && ctest --verbose && \
Expand Down
1 change: 0 additions & 1 deletion cmake/KokkosCore_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@

#cmakedefine KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE
#cmakedefine KOKKOS_ENABLE_CUDA_UVM
#cmakedefine KOKKOS_ENABLE_CUDA_LAMBDA
#cmakedefine KOKKOS_ENABLE_CUDA_CONSTEXPR
#cmakedefine KOKKOS_ENABLE_IMPL_CUDA_MALLOC_ASYNC
#cmakedefine KOKKOS_ENABLE_HIP_RELOCATABLE_DEVICE_CODE
Expand Down
4 changes: 2 additions & 2 deletions cmake/kokkos_arch.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ IF(KOKKOS_CXX_COMPILER_ID STREQUAL NVIDIA)
GLOBAL_APPEND(KOKKOS_CUDA_OPTIONS "-Wext-lambda-captures-this")
ENDIF()

IF(DEFINED KOKKOS_ENABLE_CUDA_LAMBDA)
IF(KOKKOS_ENABLE_CUDA_LAMBDA)
IF(DEFINED Kokkos_ENABLE_CUDA_LAMBDA)
IF(Kokkos_ENABLE_CUDA_LAMBDA)
MESSAGE(DEPRECATION "CUDA extended lambda support is now always enabled. The option Kokkos_ENABLE_CUDA_LAMBDA will be removed")
ELSE()
MESSAGE(FATAL_ERROR "Support for disabling CUDA extended lambdas has been removed. Please unset Kokkos_ENABLE_CUDA_LAMBDA, or see #5964 if this is necessary for your application")
Expand Down
10 changes: 1 addition & 9 deletions cmake/kokkos_enable_options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,6 @@ mark_as_advanced(Kokkos_ENABLE_IMPL_MDSPAN)
mark_as_advanced(Kokkos_ENABLE_MDSPAN_EXTERNAL)
mark_as_advanced(Kokkos_ENABLE_IMPL_SKIP_COMPILER_MDSPAN)

IF (Trilinos_ENABLE_Kokkos AND TPL_ENABLE_CUDA)
SET(CUDA_LAMBDA_DEFAULT ON)
ELSEIF (KOKKOS_ENABLE_CUDA)
SET(CUDA_LAMBDA_DEFAULT ON)
ELSE()
SET(CUDA_LAMBDA_DEFAULT OFF)
ENDIF()
KOKKOS_ENABLE_OPTION(CUDA_LAMBDA ${CUDA_LAMBDA_DEFAULT} "Whether to activate experimental lambda features")
IF (Trilinos_ENABLE_Kokkos)
SET(COMPLEX_ALIGN_DEFAULT OFF)
ELSE()
Expand Down Expand Up @@ -123,7 +115,7 @@ FUNCTION(check_device_specific_options)
ENDIF()
ENDFUNCTION()

CHECK_DEVICE_SPECIFIC_OPTIONS(DEVICE CUDA OPTIONS CUDA_UVM CUDA_RELOCATABLE_DEVICE_CODE CUDA_LAMBDA CUDA_CONSTEXPR CUDA_LDG_INTRINSIC)
CHECK_DEVICE_SPECIFIC_OPTIONS(DEVICE CUDA OPTIONS CUDA_UVM CUDA_RELOCATABLE_DEVICE_CODE CUDA_CONSTEXPR CUDA_LDG_INTRINSIC)
CHECK_DEVICE_SPECIFIC_OPTIONS(DEVICE HIP OPTIONS HIP_RELOCATABLE_DEVICE_CODE)
CHECK_DEVICE_SPECIFIC_OPTIONS(DEVICE HPX OPTIONS IMPL_HPX_ASYNC_DISPATCH)

Expand Down
5 changes: 5 additions & 0 deletions core/src/Kokkos_Macros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -607,4 +607,9 @@ static constexpr bool kokkos_omp_on_host() { return false; }
#define KOKKOS_IMPL_ENFORCE_EMPTY_BASE_OPTIMIZATION
#endif

// This was previously defined from the configuration option which was removed
#if defined(KOKKOS_ENABLE_CUDA)
#define KOKKOS_ENABLE_CUDA_LAMBDA
#endif

#endif // #ifndef KOKKOS_MACROS_HPP
6 changes: 2 additions & 4 deletions generate_makefile.bash
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ get_kokkos_cuda_option_list() {
for CUDA_ in $PARSE_CUDA_LST
do
CUDA_OPT_NAME=
if [ "${CUDA_}" == "enable_lambda" ]; then
CUDA_OPT_NAME=CUDA_LAMBDA
elif [ "${CUDA_}" == "rdc" ]; then
if [ "${CUDA_}" == "rdc" ]; then
CUDA_OPT_NAME=CUDA_RELOCATABLE_DEVICE_CODE
elif [ "${CUDA_}" == "force_uvm" ]; then
CUDA_OPT_NAME=CUDA_UVM
Expand Down Expand Up @@ -231,7 +229,7 @@ display_help_text() {
echo " disable_profiling = do not compile with profiling hooks"
echo " "
echo "--with-cuda-options=[OPT]: Additional options to CUDA:"
echo " force_uvm, use_ldg, enable_lambda, rdc"
echo " force_uvm, use_ldg, rdc"
echo "--with-hip-options=[OPT]: Additional options to HIP:"
echo " rdc"
echo "--with-hpx-options=[OPT]: Additional options to HPX:"
Expand Down
2 changes: 1 addition & 1 deletion scripts/trilinos-integration/waterman_cuda_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export CUDA_LAUNCH_BLOCKING=1
export CUDA_MANAGED_FORCE_DEVICE_ALLOC=1


export KOKKOS_EXTRA_FLAGS="-DKokkos_ENABLE_CUDA_LAMBDA=ON"
export KOKKOS_EXTRA_FLAGS=""
scriptdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo "DIR=$scriptdir"
NVCC_WRAPPER=`realpath $scriptdir/../../bin/nvcc_wrapper`
Expand Down
2 changes: 1 addition & 1 deletion scripts/trilinos-integration/white_cuda_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export CUDA_LAUNCH_BLOCKING=1
export CUDA_MANAGED_FORCE_DEVICE_ALLOC=1


export KOKKOS_EXTRA_FLAGS="-DKokkos_ENABLE_CUDA_LAMBDA=ON"
export KOKKOS_EXTRA_FLAGS=""
scriptdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
NVCC_WRAPPER=`realpath $scriptdir/../../bin/nvcc_wrapper`
export OMPI_CXX=$NVCC_WRAPPER
Expand Down

0 comments on commit 4470284

Please sign in to comment.