-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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
nvcc fatal : 'f16c': expected a number #1467
Comments
After I change my docker from CUDA11.0 to CUDA11.1, nothing happen. So the lowest version that can run llama.cpp is CUDA11.1? |
I got similar error |
What if you disable As for |
Hi @SlyEcho , I tried
Then I tried
Then I used
Then I add
Many thanks for your help! |
I think these kinds of errors come when the compiler doesn't know what CPU it is building for, if you want to use AVX and AVX2, you can try the option Take a look at what options your compiler has: |
Thanks for your detailed information, but none of these worked here 😭
After adding
|
Umm, You can also edit the CMakeCache.txt file in the build directory instead of using commands. |
No luck, still lots of error:
|
This system seems to be very old. Could you use something newer? Maybe add |
@SlyEcho , Thanks for your continued help! I just tried compile llama.cpp in a docker container with cuda11.8, it works now! |
i got the same error. how to solve it. iam very confused. |
@aditya624 what's your version of cuda? try newer versino if it's 11.0. |
i am using cuda 11.7. i think not because of cuda version. because i have another server with same cuda version running fine. but there is 1 server that has an error like this. |
Then I'm not sure what's going on... Maybe @SlyEcho got more insight 😉 |
I really can't tell much from that info, @aditya624. I don't use CUDA much myself, but I managed to compile llama.cpp on CUDA 11.4 a couple times. There are a lot of different things we tried here, maybe it's a start. |
the above command works for me. cuda version V11.0.221 |
I'v met same issue on 1080ti / ubuntu 20.04 / nvidia driver 525 / cuda toolkit 12.0 Tried just basic flags. cmake .. -DLLAMA_CUBLAS=1 -DLLAMA_BUILD_EXAMPLES=1 -DLLAMA_BUILD_TESTS=0 |
Awesome! that worked for me too! cuda version V11.0.194 |
For me, I had 2
|
@kexul You just missed several more flags that are required for legacy Intel CPUs:
@EagleChen is right, and generalizing his build command for legacy Intel CPUs: $ cmake -DCMAKE_CUDA_ARCHITECTURES="all" -DLLAMA_F16C=0 -DLLAMA_FMA=0 -DLLAMA_AVX=0 -DLLAMA_AVX2=0 -DCMAKE_C_FLAGS="-march=native" -DLLAMA_CUBLAS=1 .. For modern AMD CPUs, it is sufficient to use the build command given by @ggerganov: cmake -DCMAKE_CUDA_ARCHITECTURES="all" -DCMAKE_C_FLAGS="-march=native" -DLLAMA_CUBLAS=1 .. However, in the latter case, the default -mf16c, -mfma, ... flags are supplied to ...
[ 5%] Building CUDA object CMakeFiles/ggml.dir/ggml-cuda.cu.o
nvcc fatal : 'fma': expected a number
... In that case, use the build command listed above: $ cmake -DCMAKE_CUDA_ARCHITECTURES="all" -DLLAMA_F16C=0 -DLLAMA_FMA=0 -DLLAMA_AVX=0 -DLLAMA_AVX2=0 -DCMAKE_C_FLAGS="-march=native" -DLLAMA_CUBLAS=1 .. |
thanks , my problem was resolved by this method. additional message: +---------------------------------------------------------------------------------------+ find /usr -name nvvc , it return result as following : |
Hello there, I'm still getting the same error in Linus:
I tried bellow code without success:
CUDA version
Any suggestion? |
Prerequisites
Please answer the following questions for yourself before submitting an issue.
Expected Behavior & Failure Information & Failure Logs
I have successfully compiled the code in CPU-only mode. However, when I attempt to compile it with the '-DLLAMA_CUBLAS=1' flag to enable cuBLAS support, I encounter an error. I expect the compilation to be successful with cuBLAS enabled. Below, I have included the error logs for reference:
Environment and Context
Please provide detailed information about your computer setup. This is important in case the issue is not reproducible except for under certain specific conditions.
$ lscpu
$ uname -a
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.
The text was updated successfully, but these errors were encountered: