question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Request: Install the right XLA wheels based on the torch version and environment

See original GitHub issue

With the torch xla wheels now having a separate wheel directly for Google Colab, I think it’d be useful to have an xla installer as part of a utility in Accelerate.

In my head I imagine it would look something like so:

  1. Check if we are in Colab or not. (there are ways to do this, see the notebook_launcher code)
  2. Grab the torch XLA wheel based on the current installed torch version
  3. Install said wheel

An upgrade=True could be passed that will just install the latest torch and torch_xla wheels as well.

API wise it’d look something like so:

# from the notebook
from accelerate.utils import install_xla
install_xla()
# from the CLI
accelerate install_xla

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
muellerzrcommented, Nov 21, 2022

Feel free @bipinKrishnan! Yep more or less! If you can get that going and have the pythonic interface I can whip up the CLI half if it’s a bit too confusing 😃

1reaction
bipinKrishnancommented, Nov 20, 2022

@muellerzr Can I work on this issue?

I’m not quite sure about the CLI version but based on what you’ve already mentioned, these are the things to be done for the notebook:

  1. Create a separate file for xla stuff in accelerate/utils
  2. Add the code for colab check and to get the current version of torch
  3. Use python subprocess to install the xla wheels for the current torch version

Let me know if I’m missing something 🙂.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Install Pytorch XLA wheels and dependencies in ...
i tried this command : !pip install cloud-tpu-client==0.10 https://storage.googleapis.com/tpu-pytorch/wheels/torch_xla-1.7-cp36-cp36m-linux_x86_64.whl.
Read more >
PyTorch on XLA Devices
This snippet highlights how easy it is to switch your model to run on XLA. The model definition, dataloader, optimizer and training loop...
Read more >
FastAI XLA Extensions Library | fastai_xla_extensions
The FastAI XLA Extensions library package allows your fastai/Pytorch models to run on TPUs using the Pytorch-XLA library. Documentation Site · Install ......
Read more >
PyTorch/XLA: Performance Debugging On Cloud TPU VM
We anchor to the PyTorch / XLA 1.9 environment for this case study. ... install https://storage.googleapis.com/tpu-pytorch/wheels/tpuvm/ ...
Read more >
DLProf User Guide :: NVIDIA Deep Learning Frameworks ...
This version of Tensorflow contains the functionality to insert the NVTX markers needed by DLProf. 4.1.2. TensorFlow 2.X. The PythonPIP wheel ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found