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

torch_xla nightly installation instruction is causing missing symbols #8603

Closed
tengyifei opened this issue Jan 22, 2025 · 3 comments
Closed
Assignees

Comments

@tengyifei
Copy link
Collaborator

tengyifei commented Jan 22, 2025

Someone followed the nightly installation instruction and got:

import torch_xla
ImportError: .../python3.10/site-packages/_XLAC.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZN5torch4lazy13MetricFnValueEd

Usually, this happens because the C++ parts of torch and torch_xla are built with different C++ ABI flags.

@bhavya01 bhavya01 self-assigned this Jan 23, 2025
@bhavya01
Copy link
Collaborator

I'll take this issue. It's also causing our nightly tests to fail

@bhavya01
Copy link
Collaborator

I tried installing the nightly builds triggered by torch_xla

pip install https://storage.googleapis.com/pytorch-xla-releases/wheels/tpuvm/torch_xla-2.7.0.dev-cp310-cp310-linux_x86_64.whl
pip install https://storage.googleapis.com/pytorch-xla-releases/wheels/tpuvm/torch-2.7.0.dev-cp310-cp310-linux_x86_64.whl

This doesn't give me a missing symbol error.

This indicates that upstream pytorch might have changed the way they build their wheels. Going to look at that next.

@bhavya01
Copy link
Collaborator

Torch wheels are compiled with C++11 ABI by default now. For the latest nightly wheel installed using pip3 install --user --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu

Python 3.10.16 (main, Dec 11 2024, 16:24:50) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.compiled_with_cxx11_abi()
True

I will update torch_xla scripts to just generate one nightly wheel built with c++11 ABI

@bhavya01 bhavya01 closed this as completed Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants