-
Notifications
You must be signed in to change notification settings - Fork 4k
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
ggml.c: error: 'SYS_getcpu' undeclared did you mean 'SYS_get_cpu' #1894
Comments
I created bull request #1897 based on your description, and hope it will be included in the master branch soon. |
Hm, that's strange. We should be able to check which of the 2 is available ( cc @bmtwl Any ideas? Edit: there is already a discussion in |
[Georgi Gerganov]
Hm, that's strange. We should be able to check which of the 2 is
available (`SYS_getcpu` or `SYS_get_cpu`) and use the correct one
I tried tracking down if and when the define changed in glibc, without
any luck, so I can not tell which version of glibc to use as a
separator.
On the other hand, the code in
/usr/include/x86_64-linux-gnu/bits/syscall.h
look like this:
#ifdef __NR_getcpu
# define SYS_getcpu __NR_getcpu
#endif
It is thus very simple to use a construct like this:
#if defined(SYS_getcpu)
... use SYS_getcpu
#elif defined(SYS_get_cpu)
... use SYS_get_cpu
#endif
…--
Happy hacking
Petter Reinholdtsen
|
…s missing. Handle both SYS_get_cpu and SYS_getcpu, even though I am unsure if both ever existed, and make sure to error out if neither of them are available. Fixes ggerganov#1894.
That should do it. I'm stuck using gcc-12 for acceleration, because Nvidia cuBLAS requires it for their old glibc workarounds (Nvidia's workarounds conflict with gcc-13's hot patches which [re]address the same issue, leading to conflicts). |
Ok, would like to hear if @cebtenzzre agrees before merging |
I tested the proposed strategy on a private branch and it worked through the permutations I tried.
Has a PR been submitted for this issue, or is there still a need for one? |
== Relevant log messages from source repo: commit e04e04f8fad549bb0b3ec1c91f0413aeb08baf29 Author: Jared Van Bortel <jared@nomic.ai> Date: Wed Mar 6 15:42:23 2024 -0500 ggml : use SYS_get_cpu if SYS_getcpu is not defined (#5906) Fixes #5694 Fixes ggerganov/whisper.cpp#1894
On both projects, whisper.cpp, and llama.cpp, we get this compilation error with latest git when compiling with CUBLAS.
WHISPER_CUBLAS=1 make -j
The fix is very straightforward. We simply drop in
SYS_get_cpu
.The text was updated successfully, but these errors were encountered: