Skip to content

Commit

Permalink
cusparse spgemm: provide non-null row-ptr (#2213)
Browse files Browse the repository at this point in the history
  • Loading branch information
cwpearson authored May 31, 2024
1 parent f352a03 commit d2214e1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions sparse/tpls/KokkosSparse_spgemm_symbolic_tpl_spec_decl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,20 @@ void spgemm_symbolic_cusparse(KernelHandle *handle, lno_t m, lno_t n, lno_t k,
CUSPARSE_INDEX_32I, CUSPARSE_INDEX_32I, CUSPARSE_INDEX_BASE_ZERO,
h->scalarType));

#if CUDA_VERSION >= 12020
// at some point cusparseCreateCsr started to need a non-null row-pointer
// array, even if the operation that consumed the handle doesn't need to
// read it. This was observed on a system with CUDA 12.2, but it may have
// started earlier.
KOKKOS_CUSPARSE_SAFE_CALL(cusparseCreateCsr(
&h->descr_C, m, k, 0, (void *)row_mapC.data(), nullptr, nullptr,
CUSPARSE_INDEX_32I, CUSPARSE_INDEX_32I, CUSPARSE_INDEX_BASE_ZERO,
h->scalarType));
#else
KOKKOS_CUSPARSE_SAFE_CALL(cusparseCreateCsr(
&h->descr_C, m, k, 0, nullptr, nullptr, nullptr, CUSPARSE_INDEX_32I,
CUSPARSE_INDEX_32I, CUSPARSE_INDEX_BASE_ZERO, h->scalarType));
#endif

//----------------------------------------------------------------------
// ask bufferSize1 bytes for external memory
Expand Down

0 comments on commit d2214e1

Please sign in to comment.