llama.cpp icon indicating copy to clipboard operation
llama.cpp copied to clipboard

core dumped on riscv

Open Naveen7217 opened this issue 1 year ago • 8 comments

I'm trying to run Llama-3.2-1B-Instruct-Q8_0.gguf on riscv by using llama.cpp, it gives illegal instruction core dumped error.

Image

Image

Image

Image

Image

Naveen7217 avatar Jan 31 '25 07:01 Naveen7217

which instruction? which riscv processor?

Kreijstal avatar Jan 31 '25 07:01 Kreijstal

Hifive unmatched hardware board

Naveen7217 avatar Jan 31 '25 07:01 Naveen7217

find the instruction that caused this, you can use gdb for this

Kreijstal avatar Jan 31 '25 07:01 Kreijstal

gdb doesn't work

Naveen7217 avatar Jan 31 '25 10:01 Naveen7217

gdb doesn't work

what is the error?

Kreijstal avatar Jan 31 '25 10:01 Kreijstal

gdb doesn't work for the command ./llama-cli

Naveen7217 avatar Jan 31 '25 10:01 Naveen7217

gdb doesn't work for the command ./llama-cli

very strange

  • try compile with debug
  • use gdb with '--args' argument
  • if not working - google 'gdb connect to pid'
  • also may try use gdb server runned on riscv & connect from "standart" pc (x86_64 on example) via gdb
  • also you may try use strace (may be, i don't know)
  • also you may run gui-terminal or bash under gdb)) & run llama in it
  • hope everything works out for you before this line)))

lexasub avatar Jan 31 '25 23:01 lexasub

Can you tell me how you compiled the RISC-V version? I'm currently encountering some issues and can't use static compilation. When I try to use static compilation, I get some warnings:

/home/share/ToolChain/riscv64-unknown-linux-toolsuite-ubuntu-18/bin/../lib/gcc/riscv64-unknown-linux-gnu/13.2.0/../../../../riscv64-unknown-linux-gnu/bin/ld: ../../ggml/src/libggml.a(ggml-backend-reg.cpp.o): in function `.L0 ':
/home//llama.cpp/ggml/src/ggml-backend-reg.cpp:133:(.text+0x286e): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking

Then, when running, it directly results in illegal instructions, occurring in _dl_aux_init().

Thanks!

gzc1090 avatar Feb 10 '25 07:02 gzc1090

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Mar 31 '25 01:03 github-actions[bot]