Skip to content

import torch fails on stock ubuntu if one uses XPU nightly binaries #135867

@malfet

Description

@malfet

🐛 Describe the bug

$ docker run --rm -it python:3.10 bash -c "pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/xpu/; python -c 'import torch;print(torch.__version__)'"
Looking in indexes: https://download.pytorch.org/whl/nightly/xpu/
Collecting torch
  Downloading https://download.pytorch.org/whl/nightly/xpu/torch-2.5.0.dev20240912%2Bxpu-cp310-cp310-linux_x86_64.whl (803.0 MB)
...
Successfully installed MarkupSafe-2.1.5 filelock-3.13.1 fsspec-2024.6.1 jinja2-3.1.4 mpmath-1.3.0 networkx-3.3 packaging-22.0 pytorch-triton-xpu-3.1.0+91b14bf559 sympy-1.13.1 torch-2.5.0.dev20240912+xpu typing-extensions-4.12.2
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.10/site-packages/torch/__init__.py", line 367, in <module>
    _load_global_deps()
  File "/usr/local/lib/python3.10/site-packages/torch/__init__.py", line 323, in _load_global_deps
    raise err
  File "/usr/local/lib/python3.10/site-packages/torch/__init__.py", line 300, in _load_global_deps
    ctypes.CDLL(global_deps_lib_path, mode=ctypes.RTLD_GLOBAL)
  File "/usr/local/lib/python3.10/ctypes/__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libmkl_intel_lp64.so.2: cannot open shared object file: No such file or directory

Versions

nightly

cc @ezyang @gchanan @zou3519 @kadeng @msaroufim @gujinghui @EikanWang @fengyuan14 @guangyey

Metadata

Metadata

Assignees

Labels

high prioritymodule: crashProblem manifests as a hard crash, as opposed to a RuntimeErrormodule: xpuIntel XPU related issuestriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions