-
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
Segfault when compiling with make LLAMA_CUBLAS=1 #3054
Comments
I had better luck with cmake |
Compiling with |
What JG said. This is a pretty weird error, it looks like it crashed parsing the commandline arguments but there's nothing unusual about them. (I also can't reproduce this with identical arguments.) If you build without |
Building just using The following is trying the same with LLAMA_CUBLAS=1 as well, then running gdb on that. $ rm main I llama.cpp build info: g++ -I. -Icommon -DGGML_USE_K_QUANTS -DGGML_USE_CUBLAS -I/usr/local/cuda/include -I/opt/cuda/include -I/targets/x86_64-linux/include -O3 -std=c++11 -fPIC -O0 -g -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar -Wno-format-truncation -pthread -march=native -mtune=native examples/main/main.cpp ggml.o llama.o common.o console.o grammar-parser.o k_quants.o ggml-cuda.o ggml-alloc.o -o main -g -lcublas -lculibos -lcudart -lcublasLt -lpthread -ldl -lrt -L/usr/local/cuda/lib64 -L/opt/cuda/lib64 -L/targets/x86_64-linux/lib ==== Run ./main -h for help. ==== $ gdb ./main This GDB supports auto-downloading debuginfo from the following URLs: Program received signal SIGSEGV, Segmentation fault. |
I think you need to |
If you build with this command, it will provide a detailed explanation for segfaults:
I would also be interested to know if this occurs with a smaller model like LLaMA v2 7b that would be easier to test. |
I have verified that |
While I had the issue, it was also occuring with 7B models |
I never tried running it without arguments, @staviq |
Could you confirm that building with |
First I built with simply So the Segfault might be because of the remains of the previous |
Prerequisites
Please answer the following questions for yourself before submitting an issue.
Expected Behavior
I am trying to run nvidia-accelerated model inference since I have a 3080Ti laptop. So I built using
make LLAMA_CUBLAS=1
Current Behavior
make LLAMA_CUBLAS=1
gdb ./main
(No debugging symbols found in ./main)
(gdb) set args -m ./models/34B/codellama-34b.Q5_K_M.gguf -p "The following are three of my mostly used scripts for automating parts of my day:"
(gdb) run
Starting program: /home/torbjorn/Documents/Github/atopheim/llama.cpp/main -m ./models/34B/codellama-34b.Q5_K_M.gguf -p "The following are three of my mostly used scripts for automating parts of my day:"
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x00007fffceb5d661 in ?? () from /usr/lib/libc.so.6
(gdb) backtrace
#0 0x00007fffceb5d661 in ?? () from /usr/lib/libc.so.6
1 0x00007fffcef5a8a4 in std::char_traits::copy (__n=, __s2=0x7fffffffdd0e "./models/34B/codellama-34b.Q5_K_M.gguf", __s1=0x0) at /usr/src/debug/gcc/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/char_traits.h:445
2 std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_S_copy (__n=, __s=0x7fffffffdd0e "./models/34B/codellama-34b.Q5_K_M.gguf", __d=0x0)
at /usr/src/debug/gcc/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h:420
3 std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_S_copy (__n=, __s=0x7fffffffdd0e "./models/34B/codellama-34b.Q5_K_M.gguf", __d=0x0)
at /usr/src/debug/gcc/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h:415
4 std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_replace (this=0x7fffffffc1b0, __pos=, __len1=, __s=0x7fffffffdd0e "./models/34B/codellama-34b.Q5_K_M.gguf",
__len2=) at /usr/src/debug/gcc/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.tcc:537
5 0x00005555555f892c in gpt_params_parse(int, char**, gpt_params&) ()
6 0x0000555555564b0b in main ()
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
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 48 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 16
On-line CPU(s) list: 0-15
Vendor ID: AuthenticAMD
Model name: AMD Ryzen 9 5900HX with Radeon Graphics
CPU family: 25
Model: 80
Thread(s) per core: 2
Core(s) per socket: 8
Socket(s): 1
Stepping: 0
Frequency boost: enabled
CPU(s) scaling MHz: 70%
CPU max MHz: 4888,7690
CPU min MHz: 1200,0000
BogoMIPS: 6590,14
Virtualization features:
Virtualization: AMD-V
Caches (sum of all):
L1d: 256 KiB (8 instances)
L1i: 256 KiB (8 instances)
L2: 4 MiB (8 instances)
L3: 16 MiB (1 instance)
NUMA:
NUMA node(s): 1
NUMA node0 CPU(s): 0-15
$ uname -a
6.1.44-1-MANJARO (hashtag)1 SMP PREEMPT_DYNAMIC Wed Aug 9 09:02:26 UTC 2023 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: