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

libcudnn_cnn problem #1182

Open
781574155 opened this issue Dec 1, 2024 · 4 comments
Open

libcudnn_cnn problem #1182

781574155 opened this issue Dec 1, 2024 · 4 comments

Comments

@781574155
Copy link

781574155 commented Dec 1, 2024

INFO:faster_whisper:Processing audio with duration 03:52.176
Unable to load any of {libcudnn_cnn.so.9.1.0, libcudnn_cnn.so.9.1, libcudnn_cnn.so.9, libcudnn_cnn.so}
Invalid handle. Cannot load symbol cudnnCreateConvolutionDescriptor

ctranslate2==4.5.0
torch==2.5.1
faster-whisper==1.1.0

image

@781574155
Copy link
Author

after setup LD_LIBRARY_PATH, program run correctly.

export LD_LIBRARY_PATH=/usr/local/lib/python3.11/site-packages/nvidia/cudnn/lib/:$LD_LIBRARY_PATH

It's should be correctly setup automatically!

@likeleto
Copy link

likeleto commented Dec 9, 2024

Same thing via google colab
Unable to load any of {libcudnn_ops.so.9.1.0, libcudnn_ops.so.9.1, libcudnn_ops.so.9, libcudnn_ops.so}

!pip install ctranslate2==4.4.0 helps, but not sure 100%

@umitgunduz
Copy link

after setup LD_LIBRARY_PATH, program run correctly.

export LD_LIBRARY_PATH=/usr/local/lib/python3.11/site-packages/nvidia/cudnn/lib/:$LD_LIBRARY_PATH

It's should be correctly setup automatically!

If you are using a virtual environment, following the example below may solve your problem.

export LD_LIBRARY_PATH=.venv/lib/python3.11/site-packages/nvidia/cudnn/lib/:$LD_LIBRARY_PATH

If you are using it as a Docker image...

ENV LD_LIBRARY_PATH=.venv/lib/python3.11/site-packages/nvidia/cudnn/lib

@wredan
Copy link

wredan commented Jan 31, 2025

I ran into the same issue:

Unable to load any of {libcudnn_ops.so.9.1.0, libcudnn_ops.so.9.1, libcudnn_ops.so.9, libcudnn_ops.so}

Running the following command solved it for me:

conda install -c nvidia/label/cuda-12.4.0 cudnn

My setup:

  • faster-whisper: 1.1.1
  • ctranslate2: 4.5.0
  • PyTorch: 2.5.1
  • CUDA: 12.4
  • cuDNN: 9.1.1.17 was missing or not properly installed

Installing cuDNN via Conda resolved the problem.

Update:

If you are using faster-whisper with docker, using this docker image from nvidia solved my issue:

FROM nvidia/cuda:12.4.1-cudnn-runtime-ubuntu22.04

It has the right version of cudnn pre compiled for the cuda version I am using. Check for your version here.

Update 2:

If you are using conda envs, sometimes torch is not loading the right version of the cuDNN, giving:

cuDNN failed with status CUDNN_STATUS_SUBLIBRARY_VERSION_MISMATCH

what solved for me is:

export LD_LIBRARY_PATH="$CONDA_PREFIX/lib:$LD_LIBRARY_PATH"

so that you force torch to load the right cuDNN version.

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

4 participants