-
Notifications
You must be signed in to change notification settings - Fork 10k
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 : fix missing cpu_set_t
on emscripten
#9336
Conversation
@max-krasnyansky @fmz please take a look. |
@ngxson this should be handled by adding __GNU_SOURCE before including <sched.h> (pretty finicky, I know) Did something change? |
@fmz for android: yes, it's still there: llama.cpp/ggml/src/CMakeLists.txt Lines 1254 to 1256 in 409dc4f
But since I can't test the android build, I think it's better to reduce the scope of this PR to only target emscripten. We can continue the discussion for android on #9324 For emscripten, even with To reproduce, follow this guile: https://github.com/ngxson/wllama?tab=readme-ov-file#how-to-compile-the-binary-yourself Any idea though? |
cpu_set_t
on emscripten and androidcpu_set_t
on emscripten
Also, in other part of code: Lines 19179 to 19181 in 409dc4f
So I think it will make more sense if we have the same check for |
yeah I would suggest you do that
Interesting... |
I'm not sure I follow. They're both under the same #if/else branches |
what I mean is:
See the code: Lines 19525 to 19527 in 134bc38
Then below that: Lines 19558 to 19560 in 134bc38
My question is: can we simply apply the same |
Ah yes |
* ggml : fix missing cpu_set_t on emscripten * better version * bring back android part
* ggml : fix missing cpu_set_t on emscripten * better version * bring back android part
* ggml : fix missing cpu_set_t on emscripten * better version * bring back android part
cpu_set_t
doesn't exist on emscripten, we need to add#ifdef __gnu_linux__
. The feature was added in #8672The same method was already used in the other part of the code (for
numa
):llama.cpp/ggml/src/ggml.c
Lines 3134 to 3136 in 409dc4f