]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
ggml: force single thread on wasi (#25686)
authorMendy Berger <redacted>
Fri, 14 Aug 2026 06:16:20 +0000 (02:16 -0400)
committerGitHub <redacted>
Fri, 14 Aug 2026 06:16:20 +0000 (09:16 +0300)
ggml/src/ggml-cpu/ggml-cpu.c

index 7918845cca0848ad27655fe243b4c1f9ba14d7c8..87ac0a702efc31613b3c65e7133b45b4ab9adbe2 100644 (file)
@@ -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;