Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pytorch conversion to numpy breaks if on gpu #577

Open
HCookie opened this issue Jan 9, 2025 · 0 comments · May be fixed by #578
Open

Pytorch conversion to numpy breaks if on gpu #577

HCookie opened this issue Jan 9, 2025 · 0 comments · May be fixed by #578
Assignees
Labels
bug Something isn't working

Comments

@HCookie
Copy link
Member

HCookie commented Jan 9, 2025

What happened?

When converting a pytorch array to a numpy with array_backend.to_numpy(v), to breaks if the array is a on a gpu.

What are the steps to reproduce the bug?

import torch
from earthkit.data.utils import array as array_api

array = torch.ones((1,), device = 'cuda')
an = array_api.get_backend(array)
an.to_numpy(array)

Version

0.12.0

Platform (OS and architecture)

ATOS

Relevant log output

No response

Accompanying data

No response

Organisation

ECMWF

@HCookie HCookie added the bug Something isn't working label Jan 9, 2025
@HCookie HCookie self-assigned this Jan 9, 2025
@HCookie HCookie linked a pull request Jan 9, 2025 that will close this issue
@HCookie HCookie linked a pull request Jan 9, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant