Skip to content

Commit

Permalink
allow algorithm=native in controls
Browse files Browse the repository at this point in the history
  • Loading branch information
cwpearson committed May 26, 2022
1 parent e129641 commit d5a633e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/sparse/KokkosSparse_spmv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -753,8 +753,17 @@ void spmv(KokkosKernels::Experimental::Controls controls, const char mode[],
XVector_Internal x_i = x;
YVector_Internal y_i = y;

// use native version if conjugate (cusparseSpMM does not support)
if (Conjugate[0] == mode[0]) {
bool useNative = false;

// cusparseSpMM does not support conjugate mode
#ifdef KOKKOSKERNELS_ENABLE_TPL_CUSPARSE
useNative = useNative || (Conjugate[0] == mode[0]);
#endif
useNative =
useNative || controls.isParameter("algorithm") &&
(controls.getParameter("algorithm") == "native");

if (useNative) {
return Impl::SPMV_MV<
typename AMatrix_Internal::value_type,
typename AMatrix_Internal::ordinal_type,
Expand Down

0 comments on commit d5a633e

Please sign in to comment.