vllm icon indicating copy to clipboard operation
vllm copied to clipboard

[Bug]: undefined symbol: __nvJitLinkComplete_12_4, version libnvJitLink.so.12

Open yanan1116 opened this issue 1 year ago • 19 comments
trafficstars

Your current environment

i cannot execute collect_env.py because of this error.

in my another environment: torch is 2.4.0 and the version of vllm is 0.6.3.post1 which works fine.

Model Input Dumps

No response

🐛 Describe the bug

following installation guide: https://docs.vllm.ai/en/stable/getting_started/installation.html#install-the-latest-code

vllm version: 0.6.3.post2.dev386+g0b8bb86b

however, it forces the installation of torch to be 2.5.1

which causes the error :

Traceback (most recent call last): File "/home/ubuntu/vllm/collect_env.py", line 15, in from vllm.envs import environment_variables File "/home/ubuntu/vllm/vllm/init.py", line 3, in from vllm.engine.arg_utils import AsyncEngineArgs, EngineArgs File "/home/ubuntu/vllm/vllm/engine/arg_utils.py", line 8, in import torch File "/opt/conda/envs/vllmsource/lib/python3.11/site-packages/torch/init.py", line 367, in from torch._C import * # noqa: F403 ^^^^^^^^^^^^^^^^^^^^^^ ImportError: /opt/conda/envs/vllmsource/lib/python3.11/site-packages/torch/lib/../../nvidia/cusparse/lib/libcusparse.so.12: undefined symbol: __nvJitLinkComplete_12_4, version libnvJitLink.so.12

Before submitting a new issue...

  • [X] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

yanan1116 avatar Nov 13 '24 16:11 yanan1116

related issue: https://github.com/pytorch/pytorch/issues/111469

yanan1116 avatar Nov 13 '24 16:11 yanan1116

python -c "import torch"

error:

Traceback (most recent call last): File "", line 1, in File "/opt/conda/envs/vllmsource/lib/python3.11/site-packages/torch/init.py", line 367, in from torch._C import * # noqa: F403 ^^^^^^^^^^^^^^^^^^^^^^ ImportError: /opt/conda/envs/vllmsource/lib/python3.11/site-packages/torch/lib/../../nvidia/cusparse/lib/libcusparse.so.12: undefined symbol: __nvJitLinkComplete_12_4, version libnvJitLink.so.12

yanan1116 avatar Nov 13 '24 16:11 yanan1116

I just encountered this issue, actually it seems like both torch 2.5.0 and latest 2.5.1 revive https://github.com/pytorch/pytorch/issues/111469. I opened an issue on their repo: https://github.com/pytorch/pytorch/issues/140797.

mbertrait avatar Nov 15 '24 09:11 mbertrait

Same issue for vllm==v0.6.4.post1 and torch==2.5.1. Cuda version 12.1.

Ecocytus avatar Nov 20 '24 07:11 Ecocytus

Same issue, vllm==0.6.4 and torch==2.5.1

chintan-ushur avatar Nov 20 '24 19:11 chintan-ushur

same issue, vllm==0.6.4.post1, torch==2.5.1

GallonDeng avatar Dec 02 '24 02:12 GallonDeng

same issue, vllm==0.6.4.post1, torch==2.5.1

piamo avatar Dec 03 '24 11:12 piamo

The fix is in progress, meanwhile here is a quick workaround:

patchelf --add-rpath '$ORIGIN/../../nvidia/nvjitlink/lib' /usr/local/lib/python3.10/dist-packages/torch/lib/libtorch_cuda.so Ref - https://github.com/pytorch/pytorch/issues/140797

chintan-ushur avatar Dec 03 '24 16:12 chintan-ushur

The fix is in progress, meanwhile here is a quick workaround:

patchelf --add-rpath '$ORIGIN/../../nvidia/nvjitlink/lib' /usr/local/lib/python3.10/dist-packages/torch/lib/libtorch_cuda.so Ref - https://github.com/pytorch/pytorch/issues/140797

This is very useful.

iseesaw avatar Dec 10 '24 08:12 iseesaw

it can solve the bug: export LD_LIBRARY_PATH=/data/home/user/anaconda3/envs/vllm/lib/python3.10 /site-packages/nvidia/nvjitlink/lib:$LD_LIBRARY_PATH

fanfanaaaa avatar Dec 15 '24 13:12 fanfanaaaa

it can solve the bug: export LD_LIBRARY_PATH=/data/home/user/anaconda3/envs/vllm/lib/python3.10 /site-packages/nvidia/nvjitlink/lib:$LD_LIBRARY_PATH

Very helpful.

Hambaobao avatar Dec 25 '24 09:12 Hambaobao

it can solve the bug: export LD_LIBRARY_PATH=/data/home/user/anaconda3/envs/vllm/lib/python3.10 /site-packages/nvidia/nvjitlink/lib:$LD_LIBRARY_PATH

在2025年2月8日,测试这个解决方案成功。我的情况与vllm无关,单纯使用 python -m venv test01 创建虚拟环境,然后报上面的错。使用miniconda无误。

Cap-rgb avatar Feb 08 '25 10:02 Cap-rgb

Any updates ?

tchaton avatar Feb 09 '25 22:02 tchaton

Any updates ?

Setting the LD_LIBRARY_PATH to search in the virtual environment directory first for the library works well, update LD_LIBRARY_PATH=<path to /nvidia/nvjitlink/lib in virtual environment>:$LD_LIBRARY_PATH

neils2019 avatar Feb 10 '25 22:02 neils2019

it can solve the bug: export LD_LIBRARY_PATH=/data/home/user/anaconda3/envs/vllm/lib/python3.10 /site-packages/nvidia/nvjitlink/lib:$LD_LIBRARY_PATH

2025.02.13, this method solved problem! Tks!

kissint8 avatar Feb 13 '25 01:02 kissint8

it can solve the bug: export LD_LIBRARY_PATH=/data/home/user/anaconda3/envs/vllm/lib/python3.10 /site-packages/nvidia/nvjitlink/lib:$LD_LIBRARY_PATH

A very useful method. For pip users, the nvidia path may at /lib/python3.10/site-packages/nvidia/nvjitlink/lib

MiracleLin001 avatar Feb 13 '25 12:02 MiracleLin001

unset LD_LIBRARY_PATH works for me!

wfloveiu avatar Mar 02 '25 09:03 wfloveiu

A very useful method. For docker users (v0.7.3), the nvidia path at /usr/local/lib/python3.12/dist-packages/nvidia/nvjitlink/lib so, export LD_LIBRARY_PATH=/usr/local/lib/python3.12/dist-packages/nvidia/nvjitlink/lib:$LD_LIBRARY_PATH

kuailehaha avatar Mar 07 '25 05:03 kuailehaha

unset LD_LIBRARY_PATH works for me!

It works, thanks!

kcxain avatar Mar 07 '25 08:03 kcxain

it can solve the bug: export LD_LIBRARY_PATH=/data/home/user/anaconda3/envs/vllm/lib/python3.10 /site-packages/nvidia/nvjitlink/lib:$LD_LIBRARY_PATH

works for me

leslie2046 avatar Mar 09 '25 14:03 leslie2046

it can solve the bug: export LD_LIBRARY_PATH=/data/home/user/anaconda3/envs/vllm/lib/python3.10 /site-packages/nvidia/nvjitlink/lib:$LD_LIBRARY_PATH

It is very useful !

CauchyFanUpdate avatar Mar 29 '25 16:03 CauchyFanUpdate

unset LD_LIBRARY_PATH works for me!

It works for me too! tks!

ZhenbinChan avatar Apr 07 '25 16:04 ZhenbinChan

it can solve the bug: export LD_LIBRARY_PATH=/data/home/user/anaconda3/envs/vllm/lib/python3.10 /site-packages/nvidia/nvjitlink/lib:$LD_LIBRARY_PATH

A very useful method. For pip users, the nvidia path may at /lib/python3.10/site-packages/nvidia/nvjitlink/lib

thank u bro , THAT'S NICE

Midnight-719 avatar Apr 23 '25 07:04 Midnight-719

This issue has been automatically marked as stale because it has not had any activity within 90 days. It will be automatically closed if no further activity occurs within 30 days. Leave a comment if you feel this issue should remain open. Thank you!

github-actions[bot] avatar Jul 23 '25 02:07 github-actions[bot]

This issue has been automatically closed due to inactivity. Please feel free to reopen if you feel it is still relevant. Thank you!

github-actions[bot] avatar Aug 22 '25 02:08 github-actions[bot]