sigpy
sigpy copied to clipboard
sp.linop.ConvolveData fails on GPU, works with numpy on CPU
Describe the bug Trying to implement a dirty 1D wavelet using the convolve data linop, crashes on GPU. I suppose arraytoblock could be used instead
To Reproduce
xp = np
a = xp.zeros((1, 32), dtype=np.float32)
a[:, 15:24] = 1.0
haar_filter = xp.array([[1.0, 1.0], [1.0, -1.0]], dtype=np.float32)
haar_filter = xp.reshape(haar_filter, (2, 1, 2))
W_haar = sp.linop.ConvolveData(a.shape, haar_filter, strides=(2,), multi_channel=True, mode='valid')
b = W_haar * a
plt.figure()
plt.plot(cp.asnumpy(a.T), label='original signal')
plt.plot(cp.asnumpy(b.T), label='filtered signal')
plt.legend()
plt.show()
Expected behavior Works fine when xp is numpy, but when using cupy it throws a generic error from cudnn libraries.
CUDA version 11.6
Screenshots