Skip to content
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

Merged
merged 3 commits into from
Sep 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion ggml/src/ggml.c
Original file line number Diff line number Diff line change
Expand Up @@ -19556,7 +19556,8 @@ static bool ggml_thread_apply_priority(int32_t prio) {
return true;
}

#else // posix?
#elif defined(__gnu_linux__)
// TODO: this may not work on BSD, to be verified

static bool ggml_thread_apply_affinity(const bool * mask) {
cpu_set_t cpuset;
Expand Down Expand Up @@ -19611,6 +19612,18 @@ static bool ggml_thread_apply_priority(int32_t prio) {
return true;
}

#else // unsupported platforms

static bool ggml_thread_apply_affinity(const bool * mask) {
UNUSED(mask);
return true;
}

static bool ggml_thread_apply_priority(int32_t prio) {
UNUSED(prio);
return true;
}

#endif

static bool ggml_thread_cpumask_is_valid(const bool * mask) {
Expand Down
Loading