mikgroup/sigpy

Cupy version 9.2 not compatible with sigpy ?

mjacob75 opened this issue · 3 comments

We installed the following packages

CUDA Version: 10.2
cudatoolkit 10.2.89 h8f6ccaa_8 conda-forge
cudnn 8.2.0.53 h2c0ae14_0 conda-forge
cupy 9.2.0 py38h14045e6_0 conda-forge
sigpy 0.1.23 py38_0 frankong

and ran the following example
x = cupy.array([0.1,0.2,0.3])
sigpy.convolve(x, x)

We get the following error. Can you please let us know what is the issue and how to resolve this ?

RuntimeError Traceback (most recent call last)
in
----> 1 sigpy.convolve(x, x)

~/.conda/envs/py38new/lib/python3.8/site-packages/sigpy/conv.py in convolve(data, filt, mode, strides, multi_channel)
40 if config.cudnn_enabled:
41 if np.issubdtype(data.dtype, np.floating):
---> 42 output = _convolve_cuda(data, filt,
43 mode=mode, strides=strides,
44 multi_channel=multi_channel)

~/.conda/envs/py38new/lib/python3.8/site-packages/sigpy/conv.py in _convolve_cuda(data, filt, mode, strides, multi_channel)
339 output = xp.empty((B, c_o) + p, dtype=data.dtype)
340 filt = util.flip(filt, axes=range(-D, 0))
--> 341 cudnn.convolution_forward(data, filt, None, output,
342 pads, s, dilations, groups,
343 auto_tune=auto_tune,

cupy/cudnn.pyx in cupy.cudnn.convolution_forward()

cupy/cudnn.pyx in cupy.cudnn._find_algorithm_fwd()

RuntimeError: No available algorithm found.

You will get this error with other versions too. The current code doesn't like the 1D array (i.e. shape is (3,)) but will run if you expand the dimensions: sigpy.convolve(cupy.expand_dims(x,-1),cupy.expand_dims(x,-1)) so that the array shape is (3,1). At least that's the behavior I see.

thank you both for bring this up. I've integrated the 1D convolution fix in #88. Let me know if there's still an issue.

Thanks a lot Frank and Kevin for the prompt help !!