From c797b7400a882edffce60a8bf06086369f424328 Mon Sep 17 00:00:00 2001 From: Luc Berger Date: Tue, 19 Sep 2023 23:00:22 -0600 Subject: [PATCH] Apply suggestions from code review Simplify vector length selection Co-authored-by: brian-kelley --- sparse/impl/KokkosSparse_CrsMatrix_traversal_impl.hpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/sparse/impl/KokkosSparse_CrsMatrix_traversal_impl.hpp b/sparse/impl/KokkosSparse_CrsMatrix_traversal_impl.hpp index 95bde0ee49..4c79dc5b23 100644 --- a/sparse/impl/KokkosSparse_CrsMatrix_traversal_impl.hpp +++ b/sparse/impl/KokkosSparse_CrsMatrix_traversal_impl.hpp @@ -83,15 +83,7 @@ int64_t crsmatrix_traversal_launch_parameters(int64_t numRows, int64_t nnz, if (nnz_per_row < 1) nnz_per_row = 1; - int max_vector_length = 1; -#ifdef KOKKOS_ENABLE_CUDA - if (std::is_same::value) - max_vector_length = 32; -#endif -#ifdef KOKKOS_ENABLE_HIP - if (std::is_same::value) - max_vector_length = 64; -#endif + int max_vector_length = Kokkos::TeamPolicy::vector_length_max(); if (vector_length < 1) { vector_length = 1;