rwkv.cpp
rwkv.cpp copied to clipboard
Crash on an `endbr64` instruction.
My build crashes inferencing with a model with "Illegal Instruction".
I debugged it and seems to crash on an endbr64
instruction. I think my CPU doesn't support the instruction set.
Is there a building option to turn off the instruction set?
Version: Master, commit e84c446d9533dabef2d8d60735d5924db63362ff
Command to reproduce
python rwkv/chat_with_bot.py ../models/xxxxxxx.bin
It crashed with "Illegal Instruction"
I debugged the program:
> gdb python
(gdb) handle SIGILL stop
(gdb) run rwkv/chat_with_bot.py ../models/xxxx.bin
...
[New Thread 0x7fff6fa49640 (LWP 738136)]
Loading 20B tokenizer
System info: AVX = 1 | AVX2 = 1 | AVX512 = 0 | FMA = 1 | NEON = 0 | ARM_FMA = 0 | F16C = 1 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 0 | SSE3 = 1 | VSX = 0 |
Loading RWKV model
Thread 1 "python" received signal SIGILL, Illegal instruction.
0x00007fffde693135 in ggml_init () from /*****/rwkv.cpp/librwkv.so
(gdb) disassemble
Dump of assembler code for function ggml_init:
0x00007fffde692fd0 <+0>: endbr64
0x00007fffde692fd4 <+4>: push %r15
0x00007fffde692fd6 <+6>: mov $0x1,%eax
0x00007fffde692fdb <+11>: push %r14
...