-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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: 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: 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: Then below that: 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
):https://github.com/ggerganov/llama.cpp/blob/409dc4f8bb5185786087f52259ee4626be93f54d/ggml/src/ggml.c#L3134-L3136