-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
Unable to make LLAMA_CUBLAS=1 Unknown option forward-unknown-to-host-compiler #1404
Comments
I don't think that |
Got the same error. Slaren is right, Ubuntu 20.04 uses CUDA 10.1 by default. Got 12.1 from nvidia and that fixed the error. After some fight with apt, had only to tell make where the nvidia nvcc was with: make LLAMA_CUBLAS=1 PATH="/usr/local/cuda/bin/:$PATH" |
@RodolfoCastanheira This worked for me as well, thank you. I am using Ubuntu 20.04 on WSL 2, specifically |
@RodolfoCastanheira's solution worked for me |
I know this is an old thread but it's the #1 result in google for this problem. I am trying to compile it on Linux Mint Unbuntu with cuda 12.2 and a Tesla P40. I am not sure how to resolve "nvcc fatal : Unknown option '-forward-unknown-to-host-compiler'" Here is what I'm doing:
|
@Lucidology the solution above that includes make LLAMA_CUDA=1 PATH="/usr/local/cuda/bin/:$PATH" |
It works for me. Thank bro!!! |
Trying to do a fresh cuda based install on a ubuntu 20.04 machine with an RTX 3090 I get a nvcc fatal error
Nvidia driver: 530.30.02 Cuda driver: 12.1
This is the output.
make LLAMA_CUBLAS=1
I llama.cpp build info:
I UNAME_S: Linux
I UNAME_P: x86_64
I UNAME_M: x86_64
I CFLAGS: -I. -O3 -std=c11 -fPIC -DNDEBUG -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith -pthread -march=native -mtune=native -DGGML_USE_CUBLAS -I/usr/local/cuda/include -I/opt/cuda/include -I/targets/x86_64-linux/include
I CXXFLAGS: -I. -I./examples -O3 -std=c++11 -fPIC -DNDEBUG -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -pthread -march=native -mtune=native -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 9.4.0-1ubuntu1
20.04.1) 9.4.020.04.1) 9.4.0I CXX: g++ (Ubuntu 9.4.0-1ubuntu1
nvcc --forward-unknown-to-host-compiler -arch=native -I. -I./examples -O3 -std=c++11 -fPIC -DNDEBUG -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -pthread -march=native -mtune=native -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
nvcc fatal : Unknown option '-forward-unknown-to-host-compiler'
According to bard.google.com....
This is a known issue with CUDA 12.1. The -forward-unknown-to-host-compiler option was removed in CUDA 12.1. To work around this issue, you can use the following command:
Use code with caution. Learn more
This will compile the file without generating a warning.
The text was updated successfully, but these errors were encountered: