diff --git a/perf_test/sparse/KokkosSparse_spmv_merge.cpp b/perf_test/sparse/KokkosSparse_spmv_merge.cpp index e0973bacd8..abf05c6a8a 100644 --- a/perf_test/sparse/KokkosSparse_spmv_merge.cpp +++ b/perf_test/sparse/KokkosSparse_spmv_merge.cpp @@ -196,9 +196,8 @@ void print_help() { } int main(int argc, char** argv) { - using Scalar = default_scalar; - using lno_t = default_lno_t; - using size_type = default_size_type; + using Scalar = default_scalar; + using lno_t = default_lno_t; bool compare = false; lno_t loop = 100; diff --git a/perf_test/sparse/KokkosSparse_sptrsv_aux.hpp b/perf_test/sparse/KokkosSparse_sptrsv_aux.hpp index 3c96a4d9a5..b0c8a62ad9 100644 --- a/perf_test/sparse/KokkosSparse_sptrsv_aux.hpp +++ b/perf_test/sparse/KokkosSparse_sptrsv_aux.hpp @@ -266,7 +266,6 @@ bool check_cusparse(host_crsmat_t &Mtx, bool col_majorL, crsmat_t &L, using host_values_view_t = typename host_crsmat_t::values_type::non_const_type; - using host_scalar_t = typename host_values_view_t::value_type; using execution_space = typename values_view_t::execution_space; using memory_space = typename execution_space::memory_space; diff --git a/scripts/cm_test_all_sandia b/scripts/cm_test_all_sandia index a672b3f551..c4043a044a 100755 --- a/scripts/cm_test_all_sandia +++ b/scripts/cm_test_all_sandia @@ -86,6 +86,11 @@ print_help() { echo "" echo "--make-par-level=N: Set parallelism level for builds (default: N=12)" echo "" + echo "--with-tpls=TPLS: set KOKKOSKERNELS_ENABLE_TPLS" + echo " Provide a comma-separated list of TPLs" + echo " Valid items:" + echo " blas, mkl, cublas, cusparse, magma, armpl, rocblas, rocsparse" + echo "" echo "ARGS: list of expressions matching compilers to test" echo " supported compilers sems" @@ -1173,7 +1178,7 @@ setup_env() { NEW_TPL_LIST=$(echo ${NEW_TPL_LIST} | sed 's/.\w*$//') #echo "TESTING NEW_TPL_LIST=$NEW_TPL_LIST" - KOKKOSKERNELS_ENABLE_TPL_CMD="--with-tpls=${NEW_TPL_LIST}" + KOKKOSKERNELS_ENABLE_TPL_CMD="--with-tpls=${KOKKOSKERNELS_ENABLE_TPLS},${NEW_TPL_LIST}" #echo "TPL USAGE: KOKKOSKERNELS_ENABLE_TPL_CMD=$KOKKOSKERNELS_ENABLE_TPL_CMD" fi diff --git a/sparse/impl/KokkosSparse_spgemm_cuSPARSE_impl.hpp b/sparse/impl/KokkosSparse_spgemm_cuSPARSE_impl.hpp index e20ab4acd9..30e2fdbd79 100644 --- a/sparse/impl/KokkosSparse_spgemm_cuSPARSE_impl.hpp +++ b/sparse/impl/KokkosSparse_spgemm_cuSPARSE_impl.hpp @@ -66,15 +66,9 @@ void cuSPARSE_symbolic(KernelHandle *handle, typename KernelHandle::nnz_lno_t m, bin_nonzero_index_view_type entriesB, bool transposeB, cin_row_index_view_type row_mapC) { #ifdef KOKKOSKERNELS_ENABLE_TPL_CUSPARSE - using device1 = typename ain_row_index_view_type::device_type; - using device2 = typename ain_nonzero_index_view_type::device_type; - using idx = typename KernelHandle::nnz_lno_t; - using size_type = typename KernelHandle::size_type; - using scalar_type = typename KernelHandle::nnz_scalar_t; - - // In case the KernelHandle uses const types! - using non_const_idx = typename std::remove_cv::type; - using non_const_size_type = typename std::remove_cv::type; + using device1 = typename ain_row_index_view_type::device_type; + using device2 = typename ain_nonzero_index_view_type::device_type; + using idx = typename KernelHandle::nnz_lno_t; // TODO this is not correct, check memory space. if (std::is_same::value) { @@ -93,8 +87,10 @@ void cuSPARSE_symbolic(KernelHandle *handle, typename KernelHandle::nnz_lno_t m, #if (CUDA_VERSION >= 11040) // Newest versions of cuSPARSE have the generic SpGEMM interface, with "reuse" // functions. - if (!std::is_same::value || - !std::is_same::value) { + if (!std::is_same::type, int>::value || + !std::is_same< + typename std::remove_cv::type, + int>::value) { throw std::runtime_error( "cusparseSpGEMMreuse requires local ordinals to be 32-bit integer."); } @@ -174,12 +170,15 @@ void cuSPARSE_symbolic(KernelHandle *handle, typename KernelHandle::nnz_lno_t m, (void)row_mapC; #elif defined(CUSPARSE_VERSION) && (11000 <= CUSPARSE_VERSION) + using scalar_type = typename KernelHandle::nnz_scalar_t; // cuSPARSE from CUDA 11.0-11.3 (inclusive) supports the new "generic" SpGEMM // interface, just not the "reuse" set of functions. This means compute must // be called in both symbolic and numeric (otherwise, the NNZ of C can't be // known by symbolic) - if (!std::is_same::value || - !std::is_same::value) { + if (!std::is_same::type, int>::value || + !std::is_same< + typename std::remove_cv::type, + int>::value) { throw std::runtime_error( "cusparseSpGEMM requires local ordinals to be 32-bit integer."); } @@ -259,7 +258,8 @@ void cuSPARSE_symbolic(KernelHandle *handle, typename KernelHandle::nnz_lno_t m, #else - if (std::is_same::value && std::is_same::value) { + if (std::is_same::value && + std::is_same::value) { const idx *a_xadj = (const idx *)row_mapA.data(); const idx *b_xadj = (const idx *)row_mapB.data(); idx *c_xadj = (idx *)row_mapC.data(); @@ -267,7 +267,7 @@ void cuSPARSE_symbolic(KernelHandle *handle, typename KernelHandle::nnz_lno_t m, const idx *a_adj = entriesA.data(); const idx *b_adj = entriesB.data(); handle->create_cusparse_spgemm_handle(transposeA, transposeB); - typename KernelHandle::get_cusparse_spgemm_handle *h = + typename KernelHandle::cuSparseSpgemmHandleType *h = handle->get_cusparse_spgemm_handle(); int nnzA = entriesA.extent(0); @@ -408,8 +408,9 @@ void cuSPARSE_apply( (void)k; #elif (CUSPARSE_VERSION >= 11000) - const auto alpha = Kokkos::ArithTraits::one(); - const auto beta = Kokkos::ArithTraits::zero(); + using scalar_type = typename KernelHandle::nnz_scalar_t; + const auto alpha = Kokkos::ArithTraits::one(); + const auto beta = Kokkos::ArithTraits::zero(); typename KernelHandle::cuSparseSpgemmHandleType *h = handle->get_cusparse_spgemm_handle(); KOKKOS_CUSPARSE_SAFE_CALL(