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

Error: "cublas64_12.dll is not found or cannot be loaded" #140

Closed
BanCrash opened this issue May 5, 2024 · 15 comments
Closed

Error: "cublas64_12.dll is not found or cannot be loaded" #140

BanCrash opened this issue May 5, 2024 · 15 comments

Comments

@BanCrash
Copy link

BanCrash commented May 5, 2024

Hi, I just bought a portable computer with a NVidia 4060, I installed all the requirements but when trying to use I get the error of the title:

Traceback (most recent call last):
  File "C:\Programas\UltraSinger\src\UltraSinger.py", line 985, in <module>
    main(sys.argv[1:])
  File "C:\Programas\UltraSinger\src\UltraSinger.py", line 884, in main
    run()
  File "C:\Programas\UltraSinger\src\UltraSinger.py", line 392, in run
    detected_language, transcribed_data = transcribe_audio()
  File "C:\Programas\UltraSinger\src\UltraSinger.py", line 515, in transcribe_audio
    transcribed_data, detected_language = transcribe_with_whisper(
  File "C:\Programas\UltraSinger\src\modules\Speech_Recognition\Whisper.py", line 61, in transcribe_with_whisper
    result = loaded_whisper_model.transcribe(
  File "C:\Programas\UltraSinger\.venv\lib\site-packages\whisperx\asr.py", line 194, in transcribe
    language = language or self.detect_language(audio)
  File "C:\Programas\UltraSinger\.venv\lib\site-packages\whisperx\asr.py", line 252, in detect_language
    encoder_output = self.model.encode(segment)
  File "C:\Programas\UltraSinger\.venv\lib\site-packages\whisperx\asr.py", line 86, in encode
    return self.model.encode(features, to_cpu=to_cpu)
RuntimeError: Library cublas64_12.dll is not found or cannot be loaded

Is there anything I can do for fixing this or is a compatibility issue?

@rakuri255
Copy link
Owner

We have an ongoing discussion about it at #130
You can fix it by installing another pytourch version.

@BanCrash
Copy link
Author

BanCrash commented May 5, 2024

We have an ongoing discussion about it at #130 You can fix it by installing another pytourch version.

Oops, I didn't check it, sorry!

That solves the issue and compiles, though Crepe uses CPU:

[UltraSinger] Pitching with crepe and model full and cpu as worker

Because of this:

[UltraSinger] Checking GPU support for tensorflow and pytorch.
2024-05-05 19:37:23.586528: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2024-05-05 19:37:23.587145: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cublas64_11.dll'; dlerror: cublas64_11.dll not found
2024-05-05 19:37:23.587498: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cublasLt64_11.dll'; dlerror: cublasLt64_11.dll not found
2024-05-05 19:37:23.588825: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cufft64_10.dll'; dlerror: cufft64_10.dll not found
2024-05-05 19:37:23.593642: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cusparse64_11.dll'; dlerror: cusparse64_11.dll not found
2024-05-05 19:37:23.593798: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1850] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
[UltraSinger] tensorflow - there are no cuda devices available -> Using cpu.
[UltraSinger] tensorflow - versions above 2.10 dropped GPU support for Windows, refer to the readme for possible solutions.
[UltraSinger] pytorch - using cuda gpu.

BTW, I wouldn't mind to try the WSL solution, but I don't know how to follow after running the command:

sudo apt update && sudo apt install nvidia-cuda-toolkit

Because following the tutorial makes this issue:

/mnt/c/Programas/UltraSinger-WSL$ .venv\Scripts\activate
.venvScriptsactivate: command not found
/mnt/c/Programas/UltraSinger-WSL$ cd .venv
/mnt/c/Programas/UltraSinger-WSL/.venv$ ls -a
.  ..  bin  include  lib  lib64  pyvenv.cfg
/mnt/c/Programas/UltraSinger-WSL/.venv$ cd Scripts
-bash: cd: Scripts: No such file or directory

I imagine that the instructions for using python on linux would be different, but I never used so I don't know how to proceed.

@rakuri255
Copy link
Owner

What command did you use?
Have you also add the +cuXXX after each package?
Like here:
pip3 install torch==2.0.1+cu117 torchvision==0.15.2+cu117 torchaudio==2.0.2+cu117 --index-url https://download.pytorch.org/whl/cu117

@rakuri255
Copy link
Owner

@BanCrash i created an issue for WSL :)

@BanCrash
Copy link
Author

BanCrash commented May 11, 2024

Have you also add the +cuXXX after each package? Like here: pip3 install torch==2.0.1+cu117 torchvision==0.15.2+cu117 torchaudio==2.0.2+cu117 --index-url https://download.pytorch.org/whl/cu117

Nothing special, just UltraSinger.py -i -o .

Have you also add the +cuXXX after each package? Like here: pip3 install torch==2.0.1+cu117 torchvision==0.15.2+cu117 torchaudio==2.0.2+cu117 --index-url https://download.pytorch.org/whl/cu117

Yes, I used this command: pip install torch==2.2.1 torchvision==0.17.1 torchaudio==2.2.1 --index-url https://download.pytorch.org/whl/cu121 ,as stated on the other issue.

EDIT: I see now that I didn't, I'll do it now.

@BanCrash
Copy link
Author

BanCrash commented May 11, 2024

I went with pip install torch==2.2.1+cu121 torchvision==0.17.1+cu121 torchaudio==2.2.1+cu121 --index-url https://download.pytorch.org/whl/cu121, but the issue still exists...

@rakuri255
Copy link
Owner

try cu118

@BanCrash
Copy link
Author

I went with pip install torch==2.2.1+cu118 torchvision==0.17.1+cu118 torchaudio==2.2.1+cu118 --index-url https://download.pytorch.org/whl/cu118

Same initial error: RuntimeError: Library cublas64_12.dll is not found or cannot be loaded

@Aydonger
Copy link

Aydonger commented Jun 17, 2024

Im absolutly aware that this is not a "Solution" - but i encountered the same Problem.

And solved it in this way:
"Path to UltraSinger\.venv\Lib\site-packages\torch\lib\"

I needed the following DLL-Files (found all of them on dllme.com):

cublasLt64_10.dll
cublasLt64_11.dll
cufft64_10.dll
cusparse64_11.dll

All of them are copied in the Torch-lib Path.
AND i take the following File from my installed nVidia CUDA Directory (C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\bin)

cusparse64_12.dll

I also renamed the "cusparse64_12.dll" to "cusparse64_11.dll" (cause the _11.dll File from dllme.com doesnt work on my PC) and copied it also into the Torch-Lib Path.

And after all these "new" DLL-FIles in the lib-Directory, it runs with GPU CUDA-Support. Im aware, that this is not a waterproof solution, but it works for me.

@rakuri255
Copy link
Owner

rakuri255 commented Jun 17, 2024

@Aydonger have you tried to install the Cuda Toolkit?
@BanCrash you also tried this?

@BanCrash
Copy link
Author

@Aydonger have you tried to install the Cuda Toolkit? @BanCrash you also tried this?

I just tested installed that and last version, and using whisper large-v3 is working as expected, except for hyphenation (maybe for using large-v3 instead large-v2?

[UltraSinger] Error in hyphenation for language en, maybe you want to disable it?

@rakuri255
Copy link
Owner

ok [UltraSinger] Error in hyphenation for language en, maybe you want to disable it? is some other issue.
But did this fix the .dll issue?

@BanCrash
Copy link
Author

ok [UltraSinger] Error in hyphenation for language en, maybe you want to disable it? is some other issue. But did this fix the .dll issue?

Yes, as I've said, now it's working as expected.

@Aydonger
Copy link

@Aydonger have you tried to install the Cuda Toolkit? @BanCrash you also tried this?

As i sayed in my previous Post:

AND i take the following File from my installed nVidia CUDA Directory (C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\bin)

yes, the CUDA Toolkit from nVidia is installed. From this directory (as mentioned before) i took the cusparse64_12.dll and use this in the torch/lib Directory.

Again, it seems (in my case), that Tensorflow dont regonize the CUDA Installation on C:... - but when i took all the ddl-Files in the "lib"-Folder on the torch Application, it runs perfect. Maybe a Problem with the path or something...?

@BanCrash
Copy link
Author

I'm closing this since I didn't have this issue again. If there is any reason to keep this open feel free to reopen it.

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

3 participants