-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
CUBLAS compilation issue on 4090 with make
: "Unsupported gpu architecture 'compute_89'"
Works with cmake
or without -arch=native
#1420
Comments
make
- "Unsupported gpu architecture 'compute_89'" ; works with cmake
make
: "Unsupported gpu architecture 'compute_89'"
Works with cmake
or without -arch=native
It seems that your nvcc doesn't support |
But why does it work fine when I use cmake, or remove |
That option is meant to configure the architectures for which the CUDA code will be compiled. For local use, I am not sure why the result is different with cmake, it uses |
OK thank you very much for the detailed explanation. That makes sense now. I thought the compute arch not being found would always be a fail, and therefore I must have the right toolkit if it worked with some args. I will try to upgrade my Docker to CUDA 11.8 or 12.x for future compilations. |
Could you please tell me where the file "Makefile" is ? I donot know witch file needs to be modified |
fixed it for me: |
This didn't work for me. The core issue is the
|
Current Behavior
When building llama.cpp with
LLAMA_CUBLAS=1 make
on a system with a 4090 or L40 GPU, I get the following failure:nvcc fatal : Unsupported gpu architecture 'compute_89'
However if I remove
-arch=native
from Makefile, it will compile fine.Do I just need to update CUDA toolkit? But then why does it compile and work without that flag? CUDA 11.x is listed as compatible with compute 8.x.
Compilation failure:
I can build it instead with:
mkdir build && cd build && cmake -DLLAMA_CUBLAS=1 .. && cmake --build . --config Release
and this works.Workaround / fix
If I remove
-arch=native
from Makefile line:NVCCFLAGS = --forward-unknown-to-host-compiler -arch=native
then it compiles.But will this result in a less optimised executable?
Environment and Context
I'm using a Docker container based on Ubuntu 20.04 with CUDA 11.6
CUDA is in PATH:
Steps to Reproduce
Please provide detailed steps for reproducing the issue. We are not sitting in front of your screen, so the more detail the better.
make clean LLAMA_CUBLAS=1 make
and observe failuremkdir build && cd build && cmake -DLLAMA_CUBLAS=1 .. && cmake --build . --config Release
and it works.-arch=native
fromNVCCFLAGS = --forward-unknown-to-host-compiler -arch=native
and try step 1 again; it will now compile.Failure Logs
nvcc
Log of failed compile with make:
Log of compiling successfully with CMAKE:
Log of successful compile with
make
after removing-arch=native
The text was updated successfully, but these errors were encountered: