Skip to content

Include torchax in torch_xla #8895

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

Merged
merged 13 commits into from
Apr 4, 2025
Merged

Include torchax in torch_xla #8895

merged 13 commits into from
Apr 4, 2025

Conversation

tengyifei
Copy link
Collaborator

@tengyifei tengyifei commented Mar 27, 2025

Fixes #8831

This PR changes the torch_xla build such that torchax is automatically included, instead of being a separate install.

This motivation is to support features like #8893 and others that use xb.call_jax and requires torchax. Instead of yelling at the user to install torchax, it's easier to just install it for them.

Because torchax uses jax, we'll just automatically install jax all the time. As a result, I removed all the pip install torch_xla[pallas] and pip install torchax commands from our CI scripts in this repo.

This PR should be backwards compatible because any existing standalone torchax installs will be overwritten to use the copy from torch_xla, and any pip install torch_xla[pallas] commands will become no-op instead of failing.

@tengyifei tengyifei force-pushed the yifeit/scan-shard-as branch from 5f84ac1 to 9dcfe1c Compare March 29, 2025 00:09
@tengyifei tengyifei changed the base branch from yifeit/scan-shard-as to master March 31, 2025 19:07
@tengyifei tengyifei force-pushed the yifeit/torchax-in-torch-xla branch from 8eb87ca to a67cc9c Compare March 31, 2025 21:24
@tengyifei tengyifei changed the title Yifeit/torchax in torch xla torchax in torch xla Mar 31, 2025
@tengyifei tengyifei force-pushed the yifeit/torchax-in-torch-xla branch 2 times, most recently from 8bb02d4 to 4c4ca93 Compare April 2, 2025 00:22
@tengyifei tengyifei changed the title torchax in torch xla Include torchax in torch xla Apr 2, 2025
@tengyifei tengyifei marked this pull request as ready for review April 2, 2025 00:23
@tengyifei tengyifei changed the title Include torchax in torch xla Include torchax in torch_xla Apr 2, 2025
@tengyifei tengyifei force-pushed the yifeit/torchax-in-torch-xla branch from 13a631b to 8621943 Compare April 4, 2025 05:55
@tengyifei tengyifei merged commit bb5c6a0 into master Apr 4, 2025
18 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ship torchax inside torch_xla
3 participants