-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CUSPARSE_VERSION used to select CUSPARSE_SPM*/M*_ALG_DEFAULT #1967
Comments
Looks like the SpMV enums changed in cuSPARSE version 11.4.0 and became required in cuSPARSE version 12.0.0 (the abbreviated documentation is probably an error, Nvidia changed their documentation format in CUDA 12) |
We need to do a similar thing to check the SpMM enums |
|
The SpMM enums changed in CUDA 11.0.1 / cuSPARSE 11.0.0 |
Has this been merged to Trilinos? I am still getting errors like
|
@etphipp No, they are only in KokkosKernels develop at the moment. @ndellingwood @cwpearson Is it too late for #2011 and #2012 to get cherry picked into release-candidate-4.2.00? |
Not yet but the release is underway |
@lucbv Carl's fixes for this aren't in the 4.2 candidate actually |
Kokkos kernels provides specialisations of spMV and spMM that call CUSPARSE functions. As part of the Cuda 11 release cycle, Nvidia changed the names of the enumerator values that set the default algorithm. Thus, we can find in several files in Kokkos kernels preprocessor conditionals that select between
CUSPARSE_SPMV_ALG_DEFAULT
andCUSPARSE_MV_ALG_DEFAULT
for spMV and betweenCUSPARSE_SPMM_ALG_DEFAULT
andCUSPARSE_MM_ALG_DEFAULT
for spMM depending on theCUSPARSE_VERSION
.However, the
CUSPARSE_VERSION
used is not consistent across these files:Kokkos-kernels/perf_test/sparse/KokkosSparse_spmv_struct_tuning.cpp
, the conditional is#if CUSPARSE_VERSION >= 11201
.Kokkos-kernels/sparse/tpls/KokkosSparse_spmv_tpl_spec_decl.hpp
, the conditional is#if CUSPARSE_VERSION >= 11301
.Kokkos-kernels/sparse/tpls/KokkosSparse_spmv_mv_tpl_spec_decl.hpp
, the conditional is#if CUSPARSE_VERSION < 11010
.Moreover, the value may not always be well chosen. Indeed, as @etphipp pointed out in trilinos/Trilinos#12238, the CUSPARSE_VERSION does not necessarily match the cuda toolkit version, and Nvidia changed the enumerator values as part of the incremental subreleases in the Cuda 11 release cycle. In particular, in Cuda toolkit 11.1.1, the CUSPARSE_VERSION is 11301, and the names of the spMV default algorithm enumerator value is still
CUSPARSE_MV_ALG_DEFAULT
. Thus, choosing 11201 or 11010 as in the Kokkos kernels files mentioned above can be expected to lead to a compilation error in Cuda toolkit 11.1.1.In trilinos/Trilinos#12238, @etphipp and I went through subsequent subreleases of Cuda 11 (see details in that PR). And we found that using a CUSPARSE_VERSION of 11401 would work. It's a subrelease in which both names are available and the older one is marked deprecated.
@etphipp is in favour of addressing this issue simultaneously in all concerned packages in Trilinos and setting the same threshold (Kokkos kernels, Stokhos, muelu). In this regard, I wanted to ask your suggestion how to proceed? Should I introduce a PR in Kokkos kernels with a change to a CUSPARSE_VERSION threshold of 11401? Thanks in advance!
The text was updated successfully, but these errors were encountered: