Use spgemm when possible in csc_matrix.__mul__
@@ -85,7 +85,11 @@ class csc_matrix(_compressed._compressed_sparse_matrix):
elif cupyx.scipy.sparse.isspmatrix_csr(other):
self.sum_duplicates()
other.sum_duplicates()
- if cusparse.check_availability('csrgemm') and not runtime.is_hip:
+ if cusparse.check_availability('spgemm'):
+ a = self.tocsr()
+ a.sum_duplicates()
+ return cusparse.spgemm(a, other)
+ elif cusparse.check_availability('csrgemm') and not runtime.is_hip:
# trans=True is still buggy as of ROCm 4.2.0
a = self.T
return cusparse.csrgemm(a, other, transa=True)
