From 6d582b62d9b136cb91d0065ed44642617c79c3cc Mon Sep 17 00:00:00 2001 From: Ernesto Prudencio Date: Tue, 24 Oct 2023 22:13:00 -0600 Subject: [PATCH] Some cleanup on current pull request, making it more related to 'just' the creation of the lapack subdirectory and the moving of some files to there --- .github/workflows/osx.yml | 1 - CMakeLists.txt | 18 +----------------- cm_generate_makefile.bash | 16 +--------------- cmake/KokkosKernels_config.h.in | 6 ------ cmake/Modules/FindTPLCUSOLVER.cmake | 18 ------------------ cmake/Modules/FindTPLROCSOLVER.cmake | 12 ------------ cmake/kokkoskernels_tpls.cmake | 11 ----------- 7 files changed, 2 insertions(+), 80 deletions(-) delete mode 100644 cmake/Modules/FindTPLCUSOLVER.cmake delete mode 100644 cmake/Modules/FindTPLROCSOLVER.cmake diff --git a/.github/workflows/osx.yml b/.github/workflows/osx.yml index 10688ddb70..8d9f7123f8 100644 --- a/.github/workflows/osx.yml +++ b/.github/workflows/osx.yml @@ -103,7 +103,6 @@ jobs: -DKokkosKernels_INST_OFFSET_SIZE_T=ON \ -DKokkosKernels_ENABLE_TPL_CUSPARSE=OFF \ -DKokkosKernels_ENABLE_TPL_CUBLAS=OFF \ - -DKokkosKernels_ENABLE_TPL_CUSOLVER=OFF \ .. - name: build_kokkos_kernels diff --git a/CMakeLists.txt b/CMakeLists.txt index 85ce79d9ab..812640374b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -193,7 +193,7 @@ ELSE() "ALL" STRING "A list of components to enable in testing and building" - VALID_ENTRIES BATCHED BLAS LAPACK CUSOLVER ROCSOLVER GRAPH SPARSE ALL + VALID_ENTRIES BATCHED BLAS LAPACK GRAPH SPARSE ALL ) # ================================================================== @@ -245,8 +245,6 @@ ELSE() MESSAGE(" BATCHED: ${KokkosKernels_ENABLE_COMPONENT_BATCHED}") MESSAGE(" BLAS: ${KokkosKernels_ENABLE_COMPONENT_BLAS}") MESSAGE(" LAPACK: ${KokkosKernels_ENABLE_COMPONENT_LAPACK}") - MESSAGE(" CUSOLVER: ${KokkosKernels_ENABLE_COMPONENT_CUSOLVER}") - MESSAGE(" ROCSOLVER: ${KokkosKernels_ENABLE_COMPONENT_ROCSOLVER}") MESSAGE(" GRAPH: ${KokkosKernels_ENABLE_COMPONENT_GRAPH}") MESSAGE(" SPARSE: ${KokkosKernels_ENABLE_COMPONENT_SPARSE}") MESSAGE(" ODE: ${KokkosKernels_ENABLE_COMPONENT_ODE}") @@ -294,12 +292,6 @@ ELSE() IF (KokkosKernels_ENABLE_COMPONENT_LAPACK) INCLUDE(lapack/CMakeLists.txt) ENDIF() - IF (KokkosKernels_ENABLE_COMPONENT_CUSOLVER) - INCLUDE(lapack/CMakeLists.txt) - ENDIF() - IF (KokkosKernels_ENABLE_COMPONENT_ROCSOLVER) - INCLUDE(lapack/CMakeLists.txt) - ENDIF() IF (KokkosKernels_ENABLE_COMPONENT_GRAPH) INCLUDE(graph/CMakeLists.txt) ENDIF() @@ -382,10 +374,8 @@ ELSE() KOKKOSKERNELS_LINK_TPL(kokkoskernels PUBLIC CHOLMOD) KOKKOSKERNELS_LINK_TPL(kokkoskernels PUBLIC MKL) KOKKOSKERNELS_LINK_TPL(kokkoskernels PUBLIC CUBLAS) - KOKKOSKERNELS_LINK_TPL(kokkoskernels PUBLIC CUSOLVER) KOKKOSKERNELS_LINK_TPL(kokkoskernels PUBLIC CUSPARSE) KOKKOSKERNELS_LINK_TPL(kokkoskernels PUBLIC ROCBLAS) - KOKKOSKERNELS_LINK_TPL(kokkoskernels PUBLIC ROCSOLVER) KOKKOSKERNELS_LINK_TPL(kokkoskernels PUBLIC ROCSPARSE) KOKKOSKERNELS_LINK_TPL(kokkoskernels PUBLIC METIS) KOKKOSKERNELS_LINK_TPL(kokkoskernels PUBLIC ARMPL) @@ -423,12 +413,6 @@ ELSE() IF (KokkosKernels_ENABLE_COMPONENT_LAPACK) KOKKOSKERNELS_ADD_TEST_DIRECTORIES(lapack/unit_test) ENDIF() - IF (KokkosKernels_ENABLE_COMPONENT_CUSOLVER) - KOKKOSKERNELS_ADD_TEST_DIRECTORIES(lapack/unit_test) - ENDIF() - IF (KokkosKernels_ENABLE_COMPONENT_ROCSOLVER) - KOKKOSKERNELS_ADD_TEST_DIRECTORIES(lapack/unit_test) - ENDIF() IF (KokkosKernels_ENABLE_COMPONENT_GRAPH) KOKKOSKERNELS_ADD_TEST_DIRECTORIES(graph/unit_test) ENDIF() diff --git a/cm_generate_makefile.bash b/cm_generate_makefile.bash index 4347eb4b3b..3358ae2eb8 100755 --- a/cm_generate_makefile.bash +++ b/cm_generate_makefile.bash @@ -177,10 +177,8 @@ get_kernels_tpls_list() { KOKKOSKERNELS_USER_TPL_PATH_CMD= KOKKOSKERNELS_USER_TPL_LIBNAME_CMD= CUBLAS_DEFAULT=OFF - CUSOLVER_DEFAULT=OFF CUSPARSE_DEFAULT=OFF ROCBLAS_DEFAULT=OFF - ROCSOLVER_DEFAULT=OFF ROCSPARSE_DEFAULT=OFF PARSE_TPLS_LIST=$(echo $KOKKOSKERNELS_TPLS | tr "," "\n") for TPLS_ in $PARSE_TPLS_LIST @@ -190,18 +188,12 @@ get_kernels_tpls_list() { if [ "$UC_TPLS" == "CUBLAS" ]; then CUBLAS_DEFAULT=ON fi - if [ "$UC_TPLS" == "CUSOLVER" ]; then - CUSOLVER_DEFAULT=ON - fi if [ "$UC_TPLS" == "CUSPARSE" ]; then CUSPARSE_DEFAULT=ON fi if [ "$UC_TPLS" == "ROCBLAS" ]; then ROCBLAS_DEFAULT=ON fi - if [ "$UC_TPLS" == "ROCSOLVER" ]; then - ROCSOLVER_DEFAULT=ON - fi if [ "$UC_TPLS" == "ROCSPARSE" ]; then ROCSPARSE_DEFAULT=ON fi @@ -229,18 +221,12 @@ get_kernels_tpls_list() { if [ "$CUBLAS_DEFAULT" == "OFF" ]; then KOKKOSKERNELS_TPLS_CMD="-DKokkosKernels_ENABLE_TPL_CUBLAS=OFF ${KOKKOSKERNELS_TPLS_CMD}" fi - if [ "$CUSOLVER_DEFAULT" == "OFF" ]; then - KOKKOSKERNELS_TPLS_CMD="-DKokkosKernels_ENABLE_TPL_CUSOLVER=OFF ${KOKKOSKERNELS_TPLS_CMD}" - fi if [ "$CUSPARSE_DEFAULT" == "OFF" ]; then KOKKOSKERNELS_TPLS_CMD="-DKokkosKernels_ENABLE_TPL_CUSPARSE=OFF ${KOKKOSKERNELS_TPLS_CMD}" fi if [ "$ROCBLAS_DEFAULT" == "OFF" ]; then KOKKOSKERNELS_TPLS_CMD="-DKokkosKernels_ENABLE_TPL_ROCBLAS=OFF ${KOKKOSKERNELS_TPLS_CMD}" fi - if [ "$ROCSOLVER_DEFAULT" == "OFF" ]; then - KOKKOSKERNELS_TPLS_CMD="-DKokkosKernels_ENABLE_TPL_ROCSOLVER=OFF ${KOKKOSKERNELS_TPLS_CMD}" - fi if [ "$ROCSPARSE_DEFAULT" == "OFF" ]; then KOKKOSKERNELS_TPLS_CMD="-DKokkosKernels_ENABLE_TPL_ROCSPARSE=OFF ${KOKKOSKERNELS_TPLS_CMD}" fi @@ -359,7 +345,7 @@ display_help_text() { echo "--with-tpls=[TPLS]: Set tpls to be instantiated (Proper support requies that appropriate compiler and device must be enabled)." echo " This may require providing paths and the library name if using custom installs not on a default path" echo " that CMake searches" - echo " Options: blas, mkl, cublas, cusolver, cusparse, magma, armpl, rocblas, rocsolver, rocsparse" + echo " Options: blas, mkl, cublas, cusparse, magma, armpl, rocblas, rocsparse" echo "--user-blas-path=[PATH]: Set path to location of user-specified BLAS library." echo "--user-blas-lib=[LIB]: Library name of desired BLAS install." echo " Example: For the typical \"libblas.a\" provide \"blas\"" diff --git a/cmake/KokkosKernels_config.h.in b/cmake/KokkosKernels_config.h.in index bf063e7b63..b8b66fffbb 100644 --- a/cmake/KokkosKernels_config.h.in +++ b/cmake/KokkosKernels_config.h.in @@ -109,16 +109,12 @@ /* BLAS library */ #cmakedefine KOKKOSKERNELS_ENABLE_TPL_BLAS -/* LAPACK library */ -#cmakedefine KOKKOSKERNELS_ENABLE_TPL_LAPACK /* MKL library */ #cmakedefine KOKKOSKERNELS_ENABLE_TPL_MKL /* CUSPARSE */ #cmakedefine KOKKOSKERNELS_ENABLE_TPL_CUSPARSE /* CUBLAS */ #cmakedefine KOKKOSKERNELS_ENABLE_TPL_CUBLAS -/* CUSOLVER */ -#cmakedefine KOKKOSKERNELS_ENABLE_TPL_CUSOLVER /* MAGMA */ #cmakedefine KOKKOSKERNELS_ENABLE_TPL_MAGMA /* SuperLU */ @@ -137,8 +133,6 @@ #cmakedefine ARMPL_BUILD @ARMPL_BUILD@ /* ROCBLAS */ #cmakedefine KOKKOSKERNELS_ENABLE_TPL_ROCBLAS -/* ROCSOLVER */ -#cmakedefine KOKKOSKERNELS_ENABLE_TPL_ROCSOLVER /* ROCSPARSE */ #cmakedefine KOKKOSKERNELS_ENABLE_TPL_ROCSPARSE diff --git a/cmake/Modules/FindTPLCUSOLVER.cmake b/cmake/Modules/FindTPLCUSOLVER.cmake deleted file mode 100644 index e10d46e58c..0000000000 --- a/cmake/Modules/FindTPLCUSOLVER.cmake +++ /dev/null @@ -1,18 +0,0 @@ -FIND_PACKAGE(CUDA) - -INCLUDE(FindPackageHandleStandardArgs) -IF (NOT CUDA_FOUND) - #Important note here: this find Module is named TPLCUSOLVER - #The eventual target is named CUSOLVER. To avoid naming conflicts - #the find module is called TPLCUSOLVER. This call will cause - #the find_package call to fail in a "standard" CMake way - FIND_PACKAGE_HANDLE_STANDARD_ARGS(TPLCUSOLVER REQUIRED_VARS CUDA_FOUND) -ELSE() - #The libraries might be empty - OR they might explicitly be not found - IF("${CUDA_CUSOLVER_LIBRARIES}" MATCHES "NOTFOUND") - FIND_PACKAGE_HANDLE_STANDARD_ARGS(TPLCUSOLVER REQUIRED_VARS CUDA_CUSOLVER_LIBRARIES) - ELSE() - KOKKOSKERNELS_CREATE_IMPORTED_TPL(CUSOLVER INTERFACE - LINK_LIBRARIES "${CUDA_CUSOLVER_LIBRARIES}") - ENDIF() -ENDIF() diff --git a/cmake/Modules/FindTPLROCSOLVER.cmake b/cmake/Modules/FindTPLROCSOLVER.cmake deleted file mode 100644 index c4389f7bae..0000000000 --- a/cmake/Modules/FindTPLROCSOLVER.cmake +++ /dev/null @@ -1,12 +0,0 @@ -FIND_PACKAGE(ROCSOLVER) -if(TARGET roc::rocsolver) -## MPL: 12/29/2022: Variable TPL_ROCSOLVER_IMPORTED_NAME follows the requested convention -## of KokkosKernel (method kokkoskernels_import_tpl of kokkoskernels_tpls.cmake) - SET(TPL_ROCSOLVER_IMPORTED_NAME roc::rocsolver) - SET(TPL_IMPORTED_NAME roc::rocsolver) -## MPL: 12/29/2022: A target comming from a TPL must follows the requested convention -## of KokkosKernel (method kokkoskernels_link_tpl of kokkoskernels_tpls.cmake) - ADD_LIBRARY(KokkosKernels::ROCSOLVER ALIAS roc::rocsolver) -ELSE() - MESSAGE(FATAL_ERROR "Package ROCSOLVER requested but not found") -ENDIF() diff --git a/cmake/kokkoskernels_tpls.cmake b/cmake/kokkoskernels_tpls.cmake index 9584e028cd..be1488e051 100644 --- a/cmake/kokkoskernels_tpls.cmake +++ b/cmake/kokkoskernels_tpls.cmake @@ -456,39 +456,30 @@ ENDIF() KOKKOSKERNELS_ADD_OPTION(NO_DEFAULT_CUDA_TPLS OFF BOOL "Whether CUDA TPLs should be enabled by default. Default: OFF") SET(CUBLAS_DEFAULT ${KOKKOS_ENABLE_CUDA}) -SET(CUSOLVER_DEFAULT ${KOKKOS_ENABLE_CUDA}) SET(CUSPARSE_DEFAULT ${KOKKOS_ENABLE_CUDA}) IF(KOKKOSKERNELS_NO_DEFAULT_CUDA_TPLS) SET(CUBLAS_DEFAULT OFF) - SET(CUSOLVER_DEFAULT OFF) SET(CUSPARSE_DEFAULT OFF) ENDIF() KOKKOSKERNELS_ADD_TPL_OPTION(CUBLAS ${CUBLAS_DEFAULT} "Whether to enable CUBLAS" DEFAULT_DOCSTRING "ON if CUDA-enabled Kokkos, otherwise OFF") -KOKKOSKERNELS_ADD_TPL_OPTION(CUSOLVER ${CUSOLVER_DEFAULT} "Whether to enable CUSOLVER" - DEFAULT_DOCSTRING "ON if CUDA-enabled Kokkos, otherwise OFF") KOKKOSKERNELS_ADD_TPL_OPTION(CUSPARSE ${CUSPARSE_DEFAULT} "Whether to enable CUSPARSE" DEFAULT_DOCSTRING "ON if CUDA-enabled Kokkos, otherwise OFF") KOKKOSKERNELS_ADD_OPTION(NO_DEFAULT_ROCM_TPLS OFF BOOL "Whether ROCM TPLs should be enabled by default. Default: OFF") # Unlike CUDA, ROCm does not automatically install these TPLs SET(ROCBLAS_DEFAULT OFF) -SET(ROCSOLVER_DEFAULT OFF) SET(ROCSPARSE_DEFAULT OFF) # Since the default is OFF we do not really need this piece of logic here. # IF(KOKKOSKERNELS_NO_DEFAULT_ROCM_TPLS) # SET(ROCBLAS_DEFAULT OFF) -# SET(ROCSOLVER_DEFAULT OFF) # SET(ROCSPARSE_DEFAULT OFF) # ENDIF() KOKKOSKERNELS_ADD_TPL_OPTION(ROCBLAS ${ROCBLAS_DEFAULT} "Whether to enable ROCBLAS" DEFAULT_DOCSTRING "ON if HIP-enabled Kokkos, otherwise OFF") -KOKKOSKERNELS_ADD_TPL_OPTION(ROCSOLVER ${ROCSOLVER_DEFAULT} "Whether to enable ROCSOLVER" - DEFAULT_DOCSTRING "ON if HIP-enabled Kokkos, otherwise OFF") KOKKOSKERNELS_ADD_TPL_OPTION(ROCSPARSE ${ROCSPARSE_DEFAULT} "Whether to enable ROCSPARSE" DEFAULT_DOCSTRING "ON if HIP-enabled Kokkos, otherwise OFF") -#AquiEEP IF (KOKKOSKERNELS_ENABLE_TPL_MAGMA) IF (F77_BLAS_MANGLE STREQUAL "(name,NAME) name ## _") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DADD_ -fopenmp -lgfortran") @@ -516,7 +507,6 @@ IF (NOT KOKKOSKERNELS_HAS_TRILINOS) KOKKOSKERNELS_IMPORT_TPL(LAPACK) KOKKOSKERNELS_IMPORT_TPL(MKL) KOKKOSKERNELS_IMPORT_TPL(CUBLAS) - KOKKOSKERNELS_IMPORT_TPL(CUSOLVER) KOKKOSKERNELS_IMPORT_TPL(CUSPARSE) KOKKOSKERNELS_IMPORT_TPL(CBLAS) KOKKOSKERNELS_IMPORT_TPL(LAPACKE) @@ -526,7 +516,6 @@ IF (NOT KOKKOSKERNELS_HAS_TRILINOS) KOKKOSKERNELS_IMPORT_TPL(ARMPL) KOKKOSKERNELS_IMPORT_TPL(MAGMA) KOKKOSKERNELS_IMPORT_TPL(ROCBLAS) - KOKKOSKERNELS_IMPORT_TPL(ROCSOLVER) KOKKOSKERNELS_IMPORT_TPL(ROCSPARSE) ELSE () IF (Trilinos_ENABLE_SuperLU5_API)