-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
The detected CUDA version (11.8) mismatches the version that was used to compile PyTorch (12.1). Please make sure to use the same CUDA versions #1453
Comments
my torch version is 2.0.1 |
If your cuda version is 11.8, this command might help: pip install torch==2.0.1+cu118 torchvision==0.15.2+cu118 --index-url https://download.pytorch.org/whl/cu118 |
same problem,mark |
I have a very similar problem: but still I recive the same error. Can you help me? |
@128Ghe980 Make sure that you run |
The error message in #1453 (comment) means
So, @sujianwei1 you may need to upgrade your CUDA / NVCC to version 12.1. BTW, PyTorch 2.0.1 was built with NVCC 11.7, not 12.1. PyTorch 2.1.0 was built with nVCC 12.1. So I guess you may have installed PyTorch 2.1.0 instead of PyTorch 2.0.1, right? |
modify torch version to 2.0,is ok |
same question with cuda11.8,mark |
I'm getting this error in a Docker build, So I don't thick the problem is in my system. Am I wrong? |
Starting from vLLM v0.2.2, PyTorch v2.1 + CUDA 12.1 is supported. If problems are not solved, it might help to use vLLM >= v0.2.2. |
Unfortunately I am still experiencing this issue. The script keeps telling me that
Even though I have only specifically installed cu118. Even more so, |
Same problem with @BramVanroy , have you solved the issue? Thanks |
Sadly, no. |
Same Problem. |
Hi guys, not sure this will help, but I was troubleshooting this myself for another repo (GroundingDINO) and managed to solve the issue so just sharing the solution. I think this error occurs when the pip creates a temporary python environment to build some package, but that temporary environment may fetch a version of pytorch that's compiled with a different version of cuda than your system. To fix this, you can use the command pip install --no-build-isolation package_name, so for example for the GroundingDINO package it would be: pip install --no-build-isolation -e GroundingDINO |
|
Thank you @alik-git ! You saved my day! |
so do I replace 'GroundingDINO' with 'torch'? |
Yes that's right, whatever the name of your package that you want to install is |
RuntimeError:
The detected CUDA version (11.8) mismatches the version that was used to compile
PyTorch (12.1). Please make sure to use the same CUDA versions.
The text was updated successfully, but these errors were encountered: