You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def to_cupy_conditional(x: npt.ArrayLike, y: npt.ArrayLike) -> NDArray:
if deps.cupy_enabled:
if cp.get_array_module(x) == cp and cp.get_array_module(y) == np:
with cp.cuda.Device(x.device):
y = cp.asarray(y)
return y
The text was updated successfully, but these errors were encountered:
mrava87
added a commit
to mrava87/pylops
that referenced
this issue
May 22, 2024
The
to_cupy_conditional
method creates cupy array on the current device instead of the device ofx
.Proposed solution in #578:
The text was updated successfully, but these errors were encountered: