From 8d60f8cb118028a7771a4fb81e7b15d6d30dcf1e Mon Sep 17 00:00:00 2001 From: Evan Harvey Date: Thu, 22 Sep 2022 14:52:56 -0600 Subject: [PATCH] blas: - Include Host_Blas.cpp for ARMPL - Selectivly skip tests --- blas/CMakeLists.txt | 4 ++-- blas/tpls/KokkosBlas_Host_tpl.cpp | 1 + sparse/unit_test/Test_Sparse_bspgemm.hpp | 9 +++++++++ sparse/unit_test/Test_Sparse_spgemm.hpp | 18 ++++++++++++++++++ sparse/unit_test/Test_Sparse_spgemm_jacobi.hpp | 9 +++++++++ sparse/unit_test/Test_Sparse_spmv.hpp | 16 +++++++++------- 6 files changed, 48 insertions(+), 9 deletions(-) diff --git a/blas/CMakeLists.txt b/blas/CMakeLists.txt index e94a09d008..5f632ce497 100644 --- a/blas/CMakeLists.txt +++ b/blas/CMakeLists.txt @@ -23,13 +23,13 @@ KOKKOSKERNELS_INCLUDE_DIRECTORIES(REQUIRED_DURING_INSTALLATION_TESTING ${CMAKE_C ####################### #Include BLAS, Blas host wrapper -IF (KOKKOSKERNELS_ENABLE_TPL_BLAS OR KOKKOSKERNELS_ENABLE_TPL_MKL) +IF (KOKKOSKERNELS_ENABLE_TPL_BLAS OR KOKKOSKERNELS_ENABLE_TPL_MKL OR KOKKOSKERNELS_ENABLE_TPL_ARMPL) #Do NOT add this to include path APPEND_GLOB(SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/tpls/KokkosBlas_Host_tpl.cpp) ENDIF() # Include host blas TPL source file -IF (KOKKOSKERNELS_ENABLE_TPL_BLAS OR KOKKOSKERNELS_ENABLE_TPL_MKL) +IF (KOKKOSKERNELS_ENABLE_TPL_BLAS OR KOKKOSKERNELS_ENABLE_TPL_MKL OR KOKKOSKERNELS_ENABLE_TPL_ARMPL) LIST(APPEND SOURCES blas/tpls/KokkosBlas_Host_tpl.cpp ) diff --git a/blas/tpls/KokkosBlas_Host_tpl.cpp b/blas/tpls/KokkosBlas_Host_tpl.cpp index d2e8435fdf..2467bb7215 100644 --- a/blas/tpls/KokkosBlas_Host_tpl.cpp +++ b/blas/tpls/KokkosBlas_Host_tpl.cpp @@ -798,6 +798,7 @@ void HostBlas >::trsv(const char uplo, const char transa, F77_FUNC_ZTRSV(&uplo, &transa, &diag, &m, (const std::complex*)a, &lda, (std::complex*)b, &ldb); } + template <> void HostBlas >::gemm( const char transa, const char transb, int m, int n, int k, diff --git a/sparse/unit_test/Test_Sparse_bspgemm.hpp b/sparse/unit_test/Test_Sparse_bspgemm.hpp index 7374ac6a78..1b9ec84651 100644 --- a/sparse/unit_test/Test_Sparse_bspgemm.hpp +++ b/sparse/unit_test/Test_Sparse_bspgemm.hpp @@ -178,6 +178,15 @@ void test_bspgemm(lno_t blkDim, lno_t m, lno_t k, lno_t n, size_type nnz, lno_t bandwidth, lno_t row_size_variance, const bool use_dynamic_scheduling = true, const size_t shared_memory_size = 0) { +#if defined(KOKKOSKERNELS_ENABLE_TPL_ARMPL) + { + std::cerr + << "TEST SKIPPED: See " + "https://github.com/kokkos/kokkos-kernels/issues/1542 for details." + << std::endl; + return; + } +#endif // KOKKOSKERNELS_ENABLE_TPL_ARMPL using namespace Test; // device::execution_space::initialize(); // device::execution_space::print_configuration(std::cout); diff --git a/sparse/unit_test/Test_Sparse_spgemm.hpp b/sparse/unit_test/Test_Sparse_spgemm.hpp index f52306ef74..2f425b07d2 100644 --- a/sparse/unit_test/Test_Sparse_spgemm.hpp +++ b/sparse/unit_test/Test_Sparse_spgemm.hpp @@ -252,6 +252,15 @@ template void test_spgemm(lno_t m, lno_t k, lno_t n, size_type nnz, lno_t bandwidth, lno_t row_size_variance, bool oldInterface = false) { +#if defined(KOKKOSKERNELS_ENABLE_TPL_ARMPL) + { + std::cerr + << "TEST SKIPPED: See " + "https://github.com/kokkos/kokkos-kernels/issues/1542 for details." + << std::endl; + return; + } +#endif // KOKKOSKERNELS_ENABLE_TPL_ARMPL using namespace Test; // device::execution_space::initialize(); // device::execution_space::print_configuration(std::cout); @@ -369,6 +378,15 @@ void test_spgemm(lno_t m, lno_t k, lno_t n, size_type nnz, lno_t bandwidth, template void test_issue402() { +#if defined(KOKKOSKERNELS_ENABLE_TPL_ARMPL) + { + std::cerr + << "TEST SKIPPED: See " + "https://github.com/kokkos/kokkos-kernels/issues/1542 for details." + << std::endl; + return; + } +#endif // KOKKOSKERNELS_ENABLE_TPL_ARMPL using namespace Test; typedef CrsMatrix crsMat_t; diff --git a/sparse/unit_test/Test_Sparse_spgemm_jacobi.hpp b/sparse/unit_test/Test_Sparse_spgemm_jacobi.hpp index 4ac707c249..12cfd983f1 100644 --- a/sparse/unit_test/Test_Sparse_spgemm_jacobi.hpp +++ b/sparse/unit_test/Test_Sparse_spgemm_jacobi.hpp @@ -220,6 +220,15 @@ template void test_spgemm_jacobi(lno_t numRows, size_type nnz, lno_t bandwidth, lno_t row_size_variance) { +#if defined(KOKKOSKERNELS_ENABLE_TPL_ARMPL) + { + std::cerr + << "TEST SKIPPED: See " + "https://github.com/kokkos/kokkos-kernels/issues/1542 for details." + << std::endl; + return; + } +#endif // KOKKOSKERNELS_ENABLE_TPL_ARMPL using namespace Test; typedef CrsMatrix crsMat_t; diff --git a/sparse/unit_test/Test_Sparse_spmv.hpp b/sparse/unit_test/Test_Sparse_spmv.hpp index 113a8d9749..2e440288f4 100644 --- a/sparse/unit_test/Test_Sparse_spmv.hpp +++ b/sparse/unit_test/Test_Sparse_spmv.hpp @@ -486,13 +486,6 @@ template void test_spmv_mv(lno_t numRows, size_type nnz, lno_t bandwidth, lno_t row_size_variance, bool heavy, int numMV) { - // The kokkos-kernels gtest does not have GTEST_SKIP defined. Suggest updating - // or using kokkos/tpls/gtest instead. - // if (std::is_same>::value) - // GTEST_SKIP( - // "Skipped until https://github.com/kokkos/kokkos-kernels/issues/1331 is - // " "resolved"); using mag_t = typename Kokkos::ArithTraits::mag_type; constexpr mag_t max_x = static_cast(1); @@ -572,6 +565,15 @@ template void test_spmv_mv_heavy(lno_t numRows, size_type nnz, lno_t bandwidth, lno_t row_size_variance, int numMV) { +#if defined(KOKKOSKERNELS_ENABLE_TPL_ARMPL) + if (std::is_same>::value) { + std::cerr + << "TEST SKIPPED: See " + "https://github.com/kokkos/kokkos-kernels/issues/1331 for details." + << std::endl; + return; + } +#endif // KOKKOSKERNELS_ENABLE_TPL_ARMPL using crsMat_t = typename KokkosSparse::CrsMatrix; using ViewTypeX = Kokkos::View;