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

TPU setup in docs results in import failure for flash.Task #6382

Closed
fonnesbeck opened this issue Mar 6, 2021 · 3 comments · Fixed by #6399
Closed

TPU setup in docs results in import failure for flash.Task #6382

fonnesbeck opened this issue Mar 6, 2021 · 3 comments · Fixed by #6399
Labels
accelerator: tpu Tensor Processing Unit bug Something isn't working docs Documentation related help wanted Open to be worked on
Milestone

Comments

@fonnesbeck
Copy link

I am following TPU setup instructions on a clean Colab notebook. When I do so and attempt to import flash.Task I get the following error:

ImportError: /usr/local/lib/python3.7/dist-packages/_XLAC.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN2at13_foreach_add_EN3c108ArrayRefINS_6TensorEEENS1_INS0_6ScalarEEE

This is being run on Colab Pro with TPU enabled.

@fonnesbeck fonnesbeck added bug Something isn't working help wanted Open to be worked on labels Mar 6, 2021
@fonnesbeck
Copy link
Author

Actually, looking at the install log, I see the following:

ERROR: torch-1.15-cp36-cp36m-linux_x86_64.whl is not a supported wheel on this platform.
ERROR: torch_xla-1.15-cp36-cp36m-linux_x86_64.whl is not a supported wheel on this platform.
ERROR: torchvision-1.15-cp36-cp36m-linux_x86_64.whl is not a supported wheel on this platform.

It looks like the install instructions need to be updated.

@awaelchli awaelchli added docs Documentation related accelerator: tpu Tensor Processing Unit labels Mar 7, 2021
@awaelchli awaelchli added this to the 1.2.x milestone Mar 7, 2021
@awaelchli
Copy link
Contributor

awaelchli commented Mar 7, 2021

Here a Google Colab that shows the issue:
https://colab.research.google.com/github/PytorchLightning/pytorch-lightning/blob/master/notebooks/06-mnist-tpu-training.ipynb
need to find new wheels and then update the notebooks

@awaelchli
Copy link
Contributor

oh wow
it's because google colab recently switched the default python version from python 3.6 to 3.7.
This link works:
! pip install https://storage.googleapis.com/tpu-pytorch/wheels/torch_xla-1.7-cp37-cp37m-linux_x86_64.whl

You just have to replace 36 with 37 :)
I will update the notebooks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accelerator: tpu Tensor Processing Unit bug Something isn't working docs Documentation related help wanted Open to be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants