From: Mendy Berger Date: Fri, 14 Aug 2026 06:16:20 +0000 (-0400) Subject: ggml: force single thread on wasi (#25686) X-Git-Tag: upstream/0.0.10438~12 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=c6f6a92c553984a7f59b712d3a1694fed275e6c3;p=pkg%2Fggml%2Fsources%2Fllama.cpp ggml: force single thread on wasi (#25686) --- diff --git a/ggml/src/ggml-cpu/ggml-cpu.c b/ggml/src/ggml-cpu/ggml-cpu.c index 7918845cc..87ac0a702 100644 --- a/ggml/src/ggml-cpu/ggml-cpu.c +++ b/ggml/src/ggml-cpu/ggml-cpu.c @@ -2795,6 +2795,11 @@ struct ggml_cplan ggml_graph_plan( n_threads = 1; #endif +#if defined(__wasi__) + // WASI doesn't support parallelism yet + n_threads = 1; +#endif + size_t work_size = 0; struct ggml_cplan cplan;