Skip to content

Commit c797b74

Browse files
lucbvbrian-kelley
andauthored
Apply suggestions from code review
Simplify vector length selection Co-authored-by: brian-kelley <[email protected]>
1 parent dfd9185 commit c797b74

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

sparse/impl/KokkosSparse_CrsMatrix_traversal_impl.hpp

+1-9
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,7 @@ int64_t crsmatrix_traversal_launch_parameters(int64_t numRows, int64_t nnz,
8383

8484
if (nnz_per_row < 1) nnz_per_row = 1;
8585

86-
int max_vector_length = 1;
87-
#ifdef KOKKOS_ENABLE_CUDA
88-
if (std::is_same<execution_space, Kokkos::Cuda>::value)
89-
max_vector_length = 32;
90-
#endif
91-
#ifdef KOKKOS_ENABLE_HIP
92-
if (std::is_same<execution_space, Kokkos::Experimental::HIP>::value)
93-
max_vector_length = 64;
94-
#endif
86+
int max_vector_length = Kokkos::TeamPolicy<execution_space>::vector_length_max();
9587

9688
if (vector_length < 1) {
9789
vector_length = 1;

0 commit comments

Comments
 (0)