pytorch / xla

Enabling PyTorch on XLA Devices (e.g. Google TPU)
https://pytorch.org/xla
Other
2.48k stars 480 forks source link

v2.5.0 broken on Colab, bad library dependency #8292

Open kwikwag opened 2 weeks ago

kwikwag commented 2 weeks ago

🐛 Bug

To Reproduce

  1. Open a new Colab notebook
  2. Install v2.5.0 and import the library:
!pip install -q torch_xla==2.5.0
import torch_xla
  1. Receive the error:
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
[<ipython-input-1-a84f9ce990c3>](https://localhost:8080/#) in <cell line: 2>()
      1 get_ipython().system('pip install -q torch_xla')
----> 2 import torch_xla

[/usr/local/lib/python3.10/dist-packages/torch_xla/__init__.py](https://localhost:8080/#) in <module>
     18   sys.setdlopenflags(flags)
     19 
---> 20 import _XLAC
     21 from ._internal import tpu
     22 from .version import __version__

ImportError: /usr/local/lib/python3.10/dist-packages/_XLAC.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZN2at6native12cpu_fallbackERKN3c1014OperatorHandleEPSt6vectorINS1_6IValueESaIS6_EEbNS1_11DispatchKeyE

---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------

Expected behavior

If the package downloads and installs on the platform, the import should work. This probably means that there should be a requirement for torch at 2.5.0 or at least an appropriate library check / error message.

Environment

JackCaoG commented 2 weeks ago

right, I think the issue here is that torch and torch_xla version mismatch. It usually takes colab team a couple weeks to update the colab with latest pytorch and pytorch/xla version.

ManfeiBai commented 1 week ago

Thanks, tried with !pip install -q torch_xla==2.5.0, import torch and import torch_xla: https://colab.sandbox.google.com/drive/1pBry5eZZDIMygVGy-KwP8ANaJB_bPTq8, this notebooks looks like torch_xla2.5 available on colab notebook now too

ManfeiBai commented 1 day ago

Hi, @kwikwag, do we still blocked by this issue? if not, I might would close this issue