Skip to content

sp.linop.ConvolveData fails on GPU, works with numpy on CPU #119

@ecat

Description

@ecat

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()

image

Expected behavior
Works fine when xp is numpy, but when using cupy it throws a generic error from cudnn libraries.

image

CUDA version 11.6

Screenshots

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions