Skip to content

Avoid incorrect "Unsupported device for NumPy"; fixes #29107 #29108

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

Closed
wants to merge 2 commits into from

Conversation

jph00
Copy link

@jph00 jph00 commented May 25, 2024

Avoids incorrect ValueError: Unsupported device for NumPy: device(type='cpu') by using type attr if available.

Reference Issues/PRs

Fixes #29107

What does this implement/fix? Explain your changes.

Avoids incorrect ValueError: Unsupported device for NumPy: device(type='cpu')

Avoids incorrect `ValueError: Unsupported device for NumPy: device(type='cpu')` by using `type` attr if available.
Copy link

github-actions bot commented May 25, 2024

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: f9aea87. Link to the linter CI: here

@ogrisel
Copy link
Member

ogrisel commented May 27, 2024

I would rather not have any PyTorch-specific assumptions and instead try to find a way to fix this in a way that sticks to what is standardized in the array API spec. Let's first craft minimal reproducer in the original issue to see what needed and then use that as a non-regression test.

@ogrisel
Copy link
Member

ogrisel commented May 27, 2024

Closing in favor of #29119.

@ogrisel ogrisel closed this May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect invalid device error introduced in #25956
2 participants