Skip to content
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

Illegal instruction (Intel N4200, Linux Ubuntu Jaunty) #43

Open
radscience opened this issue Apr 26, 2023 · 4 comments
Open

Illegal instruction (Intel N4200, Linux Ubuntu Jaunty) #43

radscience opened this issue Apr 26, 2023 · 4 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@radscience
Copy link

radscience commented Apr 26, 2023

...even after building with
cmake -DRWKV_AVX=OFF -DRWKV_AVX2=OFF -DRWKV_AVX512=OFF -DRWKV_FMA=OFF -DBUILD_SHARED_LIBS=ON .
cmake --build . --config Release

This is on an N4200 cpu (has SSE2, SSSE3, SSE4_1 & SSE4_2, but not FMA or AVXs) running ubuntu jaunty (in a singularity container).

(Issue unlikely to be due to singularity: apptainer/singularity#5795)

@radscience
Copy link
Author

gdb output from gdb ./bin.test_tiny

Program received signal SIGILL, Illegal instruction.
0x00007ffff7ef0b40 in rwkv_get_system_info_string () from /home/e2/compile/rwkv.cpp/librwkv.so
#0 0x000055555557e100 in rwkv_get_system_info_string ()
(gdb) display /i $pc
1: x/i $pc
=> 0x55555557e100 <rwkv_get_system_info_string+8992>:
vmovdqu 0x10(%rax),%xmm0

Even after commenting out lines of rwkv_get_system_info_string () to force it to return 0's for AVXs.

@radscience
Copy link
Author

Also, trying to use quantize.py, gdb gives:

Starting program: /usr/bin/python3.10 rwkv/quantize.py /llms/models/RWKV-4b-Pile-171M-20230202-7922.bin /llms/models/RWKV-4b-Pile-171M-20230202-7922.rwkv.cpp-171M-Q4_1_O.bin 4
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGILL, Illegal instruction.
0x00007ffff75fcb20 in ggml_init () from /home/e2/compile/rwkv.cpp/librwkv.so
(gdb) display /i $pc
1: x/i $pc
=> 0x7ffff75fcb20 <ggml_init+400>: vpxor %xmm1,%xmm1,%xmm1
(gdb)

@saharNooby saharNooby changed the title Illegal instruction error... Illegal instruction (Intel N4200, Linux Ubuntu Jaunty) Apr 26, 2023
@saharNooby saharNooby added bug Something isn't working help wanted Extra attention is needed labels Apr 26, 2023
@largefield-ohara
Copy link

How about removing the -mf16c option from the build? There are a lot of them and you need to remove them all.
In addition, it would be useful to have an entry in cmake to remove -mf16c.

@radscience
Copy link
Author

Commenting out lines with "-mf16c" in CMakeLists.txt and ggml/src/CMakeLists.txt appears to have worked on a different machine which had the same issue. Still need to verify on the N4200 machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants