whisper.cpp icon indicating copy to clipboard operation
whisper.cpp copied to clipboard

CUDA installed and working, but getting error: nvcc: No such file or directory

Open mirozahorak opened this issue 1 year ago • 5 comments

Thanks to all involved for great progress in all areas! This project is helping us tremendously.

I am testing new GPU support on LINUX Ubuntu machine with 4090 installed and CUDA running without problem. However, on WHISPER_CUBLAS=1 make -j i get error below. Any ideas?

remote@ml:~/AI/TRANSCRIPTION/whisper.cpp$ nvidia-smi 
Fri May  5 17:28:18 2023       
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 530.41.03              Driver Version: 530.41.03    CUDA Version: 12.1     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                  Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf            Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA GeForce RTX 4090         Off| 00000000:01:00.0 Off |                  Off |
|  0%   34C    P8               15W / 450W|  14469MiB / 24564MiB |      0%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+
                                                                                         
+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A      2311      G   /usr/lib/xorg/Xorg                          252MiB |
|    0   N/A  N/A      2407    C+G   ...libexec/gnome-remote-desktop-daemon      390MiB |
|    0   N/A  N/A      2445      G   /usr/bin/gnome-shell                         18MiB |
|    0   N/A  N/A      5424      G   ...ures=TFLiteLanguageDetectionEnabled       69MiB |
|    0   N/A  N/A     72513      G   /usr/lib/xorg/Xorg                           26MiB |
|    0   N/A  N/A    146863      G   ...sion,SpareRendererForSitePerProcess       61MiB |
|    0   N/A  N/A    147217      C   /home/miro/anaconda3/bin/python           13638MiB |
|    0   N/A  N/A    165127      G   gnome-control-center                          6MiB |
+---------------------------------------------------------------------------------------+
**remote@ml:~/AI/TRANSCRIPTION/whisper.cpp$ WHISPER_CUBLAS=1 make -j**
I whisper.cpp build info: 
I UNAME_S:  Linux
I UNAME_P:  x86_64
I UNAME_M:  x86_64
I CFLAGS:   -I.              -O3 -DNDEBUG -std=c11   -fPIC -pthread -mavx2 -mfma -mf16c -mavx -msse3 -DGGML_USE_CUBLAS -I/usr/local/cuda/include -I/opt/cuda/include -I/targets/x86_64-linux/include
I CXXFLAGS: -I. -I./examples -O3 -DNDEBUG -std=c++11 -fPIC -pthread -DGGML_USE_CUBLAS -I/usr/local/cuda/include -I/opt/cuda/include -I/targets/x86_64-linux/include
I LDFLAGS:  -lcublas -lculibos -lcudart -lcublasLt -lpthread -ldl -lrt -L/usr/local/cuda/lib64 -L/opt/cuda/lib64 -L/targets/x86_64-linux/lib
I CC:       cc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
I CXX:      g++ (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0

nvcc --forward-unknown-to-host-compiler -arch=native -I. -I./examples -O3 -DNDEBUG -std=c++11 -fPIC -pthread -DGGML_USE_CUBLAS -I/usr/local/cuda/include -I/opt/cuda/include -I/targets/x86_64-linux/include -Wno-pedantic -c ggml-cuda.cu -o ggml-cuda.o
make: nvcc: No such file or directory
make: *** [Makefile:171: ggml-cuda.o] Error 127

mirozahorak avatar May 05 '23 15:05 mirozahorak

Posting this as a solution that worked for me: I added to .bashrc:

export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

mirozahorak avatar May 05 '23 15:05 mirozahorak

Although this is a rust binding variant of this error, if you're using the whisper-rs crate and you enable the cuda feature you MAY need to:

export CUDACXX=/usr/local/cuda-12.0/bin/nvcc

chriskyndrid avatar Jul 02 '23 17:07 chriskyndrid

Might help somebody, but to get the nvcc command I had to run: sudo apt install nvidia-cuda-toolkit

kornpow avatar Nov 17 '23 04:11 kornpow

Posting this as a solution that worked for me: I added to .bashrc:

export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

thank you @mirozahorak

iz-ben avatar Mar 28 '24 17:03 iz-ben

Might help somebody, but to get the nvcc command I had to run: sudo apt install nvidia-cuda-toolkit

HELPED ME!!

thendralmagudapathi avatar Jul 24 '24 10:07 thendralmagudapathi