To install the nightly build of PyTorch/XLA, you can follow these steps:
1. Install PyTorch Nightly Build:
First, install the PyTorch nightly build using pip. You can specify the version and date if needed. For example, to install a recent nightly build, you can use:
bash
pip3 install torch==2.7.0.dev20250124+cpu --index-url https://download.pytorch.org/whl/nightly/cpu
2. Install PyTorch/XLA Nightly Build:
Next, install the PyTorch/XLA nightly build. You can download the wheel directly from the Google Cloud Storage bucket. For example, for Python 3.10:
bash
pip3 install https://storage.googleapis.com/pytorch-xla-releases/wheels/tpuvm/torch_xla-2.7.0.dev20250124+cxx11-cp310-cp310-linux_x86_64.whl
Make sure to replace the version and date with the one you need.
3. Optional Dependencies:
If you are using custom kernels, you might need to install additional dependencies like Pallas. You can do this by adding the Pallas option:
bash
pip install 'torch_xla[pallas]' \
-f https://storage.googleapis.com/jax-releases/jax_nightly_releases.html \
-f https://storage.googleapis.com/jax-releases/jaxlib_nightly_releases.html
4. Additional Libraries:
Depending on your environment, you might need to install additional libraries such as `libopenblas-dev` or `libgl1`:
bash
sudo apt-get update && sudo apt-get install libopenblas-dev -y
sudo apt-get update && sudo apt-get install libgl1 -y
These steps should help you install the nightly build of PyTorch/XLA on your system[1][3].
Citations:[1] https://github.com/pytorch/xla
[2] https://discuss.pytorch.org/t/install-particular-pytorch-nightly/186853
[3] https://pytorch.org/xla/master/learn/xla-overview.html
[4] https://stackoverflow.com/questions/63486381/missing-xla-configuration-when-running-pytorch-xla
[5] https://github.com/pytorch/xla/issues/3186
[6] https://pytorch.org/xla/release/2.3/index.html
[7] https://pytorch.org/xla/release/2.2/index.html
[8] https://stackoverflow.com/questions/67417532/numpy-not-available-after-installing-pytorch-xla