Skip to content

Commit

Permalink
make sure cuda lambda support is enabled for cusparse tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremiah J Wilke committed Mar 5, 2020
1 parent 0479592 commit c97616e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmake/kokkoskernels_tpls.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -458,3 +458,12 @@ STRING(REPLACE ";" "\n" KOKKOSKERNELS_TPL_EXPORT_TEMP "${KOKKOSKERNELS_TPL_EXPOR
#Convert to a regular variable
UNSET(KOKKOSKERNELS_TPL_EXPORTS CACHE)
SET(KOKKOSKERNELS_TPL_EXPORTS ${KOKKOSKERNELS_TPL_EXPORT_TEMP})

IF (KOKKOSKERNELS_ENABLE_TPL_CUSPARSE AND KOKKOSKERNELS_ENABLE_TESTS)
#The tests use CUDA lambdas, make sure Kokkos was built
#with CUDA lambda support
KOKKOS_CHECK(OPTIONS CUDA_LAMBDA RETURN_VALUE HAVE_CUDA_LAMBDA)
IF (NOT HAVE_CUDA_LAMBDA)
MESSAGE(FATAL_ERROR "CUSPARSE tests require Kokkos to be built with CUDA lambda. Please reinstall Kokkos using -DKokkos_ENABLE_CUDA_LAMBDA=ON")
ENDIF()
ENDIF()
1 change: 1 addition & 0 deletions scripts/cm_test_all_sandia
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,7 @@ setup_env() {
# device tpls
if [[ "$compiler" == cuda* ]]; then
NEW_TPL_LIST="cublas,cusparse,"
export KOKKOS_CUDA_OPTIONS="${KOKKOS_CUDA_OPTIONS},enable_lambda"
fi
# host tpls - use mkl with intel, else use host blas
if [[ "$compiler" == intel* ]]; then
Expand Down

0 comments on commit c97616e

Please sign in to comment.