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

Make libtpu install more explict #7737

Merged
merged 2 commits into from
Jul 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ To install PyTorch/XLA nightly build in a new TPU VM:

```
pip3 install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu
Copy link
Collaborator

Choose a reason for hiding this comment

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

Regarding #7697 (comment), can you also add an optional command at the end to install compatible torchaudio, torchtext, and torchvision from the PyTorch nightly index?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we rarely ever need torchaudio or torchtext. I think we put torchvision here because I use resnet in my examples.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'll follow up on this since it's tangential to this PR's topic. IMO it's still useful to include the other official ecosystem packages. It's very easy to break nightly torch_xla by installing a stable torchtext that pulls in an incompatible stable torch. We've made this mistake numerous times in our own test cases.

Copy link
Collaborator

Choose a reason for hiding this comment

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

If we want to install torchaudio, torchtext, etc. from the PyTorch nightly index, the command from PyTorch index page https://screenshot.googleplex.com/8xKE2QXabRsqq9D is pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu. They should be compatible already.

pip3 install https://storage.googleapis.com/pytorch-xla-releases/wheels/tpuvm/torch_xla-nightly-cp310-cp310-linux_x86_64.whl
pip install 'torch_xla[tpu] @ https://storage.googleapis.com/pytorch-xla-releases/wheels/tpuvm/torch_xla-nightly-cp310-cp310-linux_x86_64.whl' -f https://storage.googleapis.com/libtpu-releases/index.html
```

### GPU Plugin (beta)
Expand Down Expand Up @@ -148,7 +148,7 @@ Our comprehensive user guides are available at:

PyTorch/XLA releases starting with version r2.1 will be available on PyPI. You
can now install the main build with `pip install torch_xla`. To also install the
Cloud TPU plugin, install the optional `tpu` dependencies after installing the main build with
Cloud TPU plugin corresponding to your installed `torch_xla`, install the optional `tpu` dependencies after installing the main build with

```
pip install torch_xla[tpu] -f https://storage.googleapis.com/libtpu-releases/index.html
Expand Down
Loading