Rename a function
@@ -392,7 +392,7 @@ def lsmr(A, b, x0=None, damp=0.0, atol=1e-6, btol=1e-6, conlim=1e8,
return x, istop, itn, normr, normar, normA, condA, normx
-def _does_use_spsm(b):
+def _should_use_spsm(b):
if not runtime.is_hip:
# cusparseSpSM in CUDA 11.5 and eariler produces wrong results with
# transposed B
@@ -453,7 +453,7 @@ def spsolve_triangular(A, b, lower=True, overwrite_A=False, overwrite_b=False,
if A.dtype.char not in 'fdFD':
raise TypeError(f'unsupported dtype (actual: {A.dtype})')
- if cusparse.check_availability('spsm') and _does_use_spsm(b):
+ if cusparse.check_availability('spsm') and _should_use_spsm(b):
if not (sparse.isspmatrix_csr(A) or
sparse.isspmatrix_csc(A) or
sparse.isspmatrix_coo(A)):
@@ -574,7 +574,7 @@ class SuperLU():
if trans not in ('N', 'T', 'H'):
raise ValueError('trans must be \'N\', \'T\', or \'H\'')
- if cusparse.check_availability('spsm') and _does_use_spsm(rhs):
+ if cusparse.check_availability('spsm') and _should_use_spsm(rhs):
def spsm(A, B, lower, transa):
return cusparse.spsm(A, B, lower=lower, transa=transa)
sm = spsm
