]> git.djapps.eu Git - pkg/ggml/sources/ggml/commitdiff
examples : add null threadpool args where needed (#0)
authorGeorgi Gerganov <redacted>
Sun, 8 Sep 2024 08:10:43 +0000 (11:10 +0300)
committerGeorgi Gerganov <redacted>
Sun, 8 Sep 2024 11:43:07 +0000 (14:43 +0300)
ggml-ci

examples/gpt-2/main-alloc.cpp
examples/sam/main.cpp
src/ggml.c

index ba8906573c9dd74bd4a9576b1495803f43fad6cb..ac925da9e7977e73051ff5988a63baeffaa47868 100644 (file)
@@ -698,7 +698,7 @@ bool gpt2_eval(
     }
 
     // run the computation
-    struct ggml_cplan plan = ggml_graph_plan(gf, n_threads);
+    struct ggml_cplan plan = ggml_graph_plan(gf, n_threads, nullptr);
     static std::vector<uint8_t> work_buffer;
     work_buffer.resize(plan.work_size);
     plan.work_data = work_buffer.data();
index 13d27b5451ba256e15491d169de646532df2c6e1..749be6fa2fe1e71f21e383eb5bfa78cdd40c19fa 100644 (file)
@@ -345,7 +345,7 @@ static void ggml_disconnect_node_from_graph(ggml_tensor * t) {
 }
 
 static void ggml_graph_compute_helper(std::vector<uint8_t> & buf, ggml_cgraph * graph, int n_threads) {
-    struct ggml_cplan plan = ggml_graph_plan(graph, n_threads);
+    struct ggml_cplan plan = ggml_graph_plan(graph, n_threads, nullptr);
 
     if (plan.work_size > 0) {
         buf.resize(plan.work_size);
index 28ee46e042bbce644505a77114ad3440cef08ad4..f188e448e7a3c5b59554a544e81aea9794c01601 100644 (file)
@@ -19710,8 +19710,8 @@ void ggml_threadpool_resume(struct ggml_threadpool * threadpool) {
 
 struct ggml_cplan ggml_graph_plan(
           const struct ggml_cgraph * cgraph,
-                           int       n_threads,
-    struct ggml_threadpool * threadpool) {
+                               int   n_threads,
+            struct ggml_threadpool * threadpool) {
 
     if (threadpool == NULL) {
         GGML_PRINT_DEBUG("Threadpool is not specified. Will create a disposable threadpool : n_threads %d\n", n_threads);