You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm reading the source code of llama.cpp. Currently in the backend registration when initialization.
My output
ggml_init: context initialized
ggml_cpu_init: GELU, Quick GELU, SILU and EXP tables initialized in 5.154000 ms
register_backend: registered backend CPU (1 devices)
register_device: registered device CPU (INTEL(R) XEON(R) PLATINUM 8558)
load_backend: failed to find ggml_backend_init in /home/lin/bs/myllama/llama.cpp/build/bin/libggml-cpu.so
My first question is that similar functions exist in my dynamic link library and I don't know if there is an error here.
$ nm -D /home/lin/bs/myllama/llama.cpp/build/bin/libggml-cpu.so | grep init
U ggml_backend_buffer_init
000000000004f179 T ggml_backend_cpu_init
000000000004e315 T ggml_cpu_init
U ggml_init
0000000000019204 T ggml_numa_init
U pthread_getaffinity_np@GLIBC_2.32
U pthread_setaffinity_np@GLIBC_2.34
My second question is about CPU backend registration. You can see that static ggml_backend_registry reg is automatically initialized when using get_reg(), and register_backend(ggml_backend_cpu_reg()); is called in its constructor to register the CPU backend. This seems to have nothing to do with DDL. Then we returns to ggml_backend_load_best("cpu", silent, dir_path);, where the location of the DDL is found, and finally return get_reg().load_backend(path, silent); is used to try to load it, and then the error of not finding the function mentioned above appears. My question is why for the CPU backend, there seems to be two registrations here?
I found a related content that mentions GGML_BACKEND_DL, but from looking at build.sh, it seems like this is only relevant for GPUs? Can anyone explain this symbol and the default behavior when building with llama.cpp?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm reading the source code of llama.cpp. Currently in the backend registration when initialization.
My output
My first question is that similar functions exist in my dynamic link library and I don't know if there is an error here.
My second question is about CPU backend registration. You can see that
static ggml_backend_registry reg
is automatically initialized when using get_reg(), andregister_backend(ggml_backend_cpu_reg());
is called in its constructor to register the CPU backend. This seems to have nothing to do with DDL. Then we returns toggml_backend_load_best("cpu", silent, dir_path);
, where the location of the DDL is found, and finallyreturn get_reg().load_backend(path, silent);
is used to try to load it, and then the error of not finding the function mentioned above appears. My question is why for the CPU backend, there seems to be two registrations here?I found a related content that mentions
GGML_BACKEND_DL
, but from looking atbuild.sh
, it seems like this is only relevant for GPUs? Can anyone explain this symbol and the default behavior when building with llama.cpp?Beta Was this translation helpful? Give feedback.
All reactions