8000 ENH: support PyTorch `device='meta'` by crusaderky · Pull Request #300 · data-apis/array-api-extra · GitHub
[go: up one dir, main page]

Skip to content

ENH: support PyTorch device='meta' #300

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 G 8000 itHub”, 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

Merged
merged 5 commits into from
May 19, 2025
Merged

Conversation

crusaderky
Copy link
Contributor
@crusaderky crusaderky commented May 18, 2025
  • Add support for PyTorch meta device. Specifically, this PR fixes:
    • apply_where
    • nunique
    • _testing.xp_assert_equal
    • _testing.xp_assert_close
    • _testing.xp_assert_less
  • Test PyTorch input->output device propagation
    • when input device is meta but default device is cpu;
    • on pixi environments tests_cuda and dev_cuda, when input device is cpu but default device is cuda

XREF data-apis/array-api#945

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to add an explicit test for xp_assert_equal etc. but it's blocked by #301

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now merged

Copy link
Member
@lucascolley lucascolley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just one comment

@lucascolley lucascolley added the enhancement New feature or request label May 18, 2025
@lucascolley lucascolley added this to the 0.8.0 milestone May 18, 2025
@lucascolley lucascolley merged commit 27fbd9c into data-apis:main May 19, 2025
9 checks passed
@crusaderky crusaderky deleted the torch_meta branch May 19, 2025 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0