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

Failed to build SAM-2 [CUDA compatibility issue ?] #24

Closed
kevinhelvig opened this issue Jul 30, 2024 · 7 comments
Closed

Failed to build SAM-2 [CUDA compatibility issue ?] #24

kevinhelvig opened this issue Jul 30, 2024 · 7 comments

Comments

@kevinhelvig
Copy link

kevinhelvig commented Jul 30, 2024

Hi,
I can't build the SAM-2. I have the following error when running python3.11 -m pip install -e . command

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.

Debug attempts :

  • update conda
  • try re-install pytorch with associated CUDA11.8 python3.11 -m pip install torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 --index-url https://download.pytorch.org/whl/cu118
  • also a try with force command

Thanks for help

Conda list of package :

_libgcc_mutex 0.1 main
_openmp_mutex 5.1 1_gnu
bzip2 1.0.8 h5eee18b_6
ca-certificates 2024.7.2 h06a4308_0
filelock 3.13.1 pypi_0 pypi
fsspec 2024.2.0 pypi_0 pypi
jinja2 3.1.3 pypi_0 pypi
ld_impl_linux-64 2.38 h1181459_1
libffi 3.4.4 h6a678d5_1
libgcc-ng 11.2.0 h1234567_1
libgomp 11.2.0 h1234567_1
libstdcxx-ng 11.2.0 h1234567_1
libuuid 1.41.5 h5eee18b_0
markupsafe 2.1.5 pypi_0 pypi
mpmath 1.3.0 pypi_0 pypi
ncurses 6.4 h6a678d5_0
networkx 3.2.1 pypi_0 pypi
numpy 1.26.3 pypi_0 pypi
nvidia-cublas-cu11 11.11.3.6 pypi_0 pypi
nvidia-cuda-cupti-cu11 11.8.87 pypi_0 pypi
nvidia-cuda-nvrtc-cu11 11.8.89 pypi_0 pypi
nvidia-cuda-runtime-cu11 11.8.89 pypi_0 pypi
nvidia-cudnn-cu11 8.7.0.84 pypi_0 pypi
nvidia-cufft-cu11 10.9.0.58 pypi_0 pypi
nvidia-curand-cu11 10.3.0.86 pypi_0 pypi
nvidia-cusolver-cu11 11.4.1.48 pypi_0 pypi
nvidia-cusparse-cu11 11.7.5.86 pypi_0 pypi
nvidia-nccl-cu11 2.20.5 pypi_0 pypi
nvidia-nvtx-cu11 11.8.86 pypi_0 pypi
openssl 3.0.14 h5eee18b_0
pillow 10.2.0 pypi_0 pypi
pip 24.0 py311h06a4308_0
python 3.11.9 h955ad1f_0
readline 8.2 h5eee18b_0
setuptools 69.5.1 py311h06a4308_0
sqlite 3.45.3 h5eee18b_0
sympy 1.12 pypi_0 pypi
tk 8.6.14 h39e8969_0
torch 2.3.1+cu118 pypi_0 pypi
torchaudio 2.3.1+cu118 pypi_0 pypi
torchvision 0.18.1+cu118 pypi_0 pypi
triton 2.3.1 pypi_0 pypi
typing-extensions 4.9.0 pypi_0 pypi
tzdata 2024a h04d1e81_0
wheel 0.43.0 py311h06a4308_0
xz 5.4.6 h5eee18b_1
zlib 1.2.13 h5eee18b_1

@ChinaStark
Copy link

The detected CUDA version (11.7) mismatches the version that was used to compile
PyTorch (12.1). Please make sure to use the same CUDA versions.

@ChinaStark
Copy link

did you solved ?

@ChinaStark
Copy link

cuda 12.1???

@kevinhelvig
Copy link
Author

I tried re-installing torch etc ..; with both cuda 11.8 and 12.1 and it still doesn't work

@kevinhelvig
Copy link
Author

my cuda version is 12.1 (nvidia-smi command) but even if I reinstall pytorch with cuda 12.1 I have the same error

@ChinaStark
Copy link

my cuda version is 12.1 (nvidia-smi command) but even if I reinstall pytorch with cuda 12.1 I have the same error

See this URL, #18

I will try later

@kevinhelvig
Copy link
Author

Thanks, the hack proposed in #18 worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants