diff --git a/examples/gpt-2/main-alloc.cpp b/examples/gpt-2/main-alloc.cpp index ba8906573..ac925da9e 100644 --- a/examples/gpt-2/main-alloc.cpp +++ b/examples/gpt-2/main-alloc.cpp @@ -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 work_buffer; work_buffer.resize(plan.work_size); plan.work_data = work_buffer.data(); diff --git a/examples/sam/main.cpp b/examples/sam/main.cpp index 13d27b545..749be6fa2 100644 --- a/examples/sam/main.cpp +++ b/examples/sam/main.cpp @@ -345,7 +345,7 @@ static void ggml_disconnect_node_from_graph(ggml_tensor * t) { } static void ggml_graph_compute_helper(std::vector & 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); diff --git a/src/ggml.c b/src/ggml.c index 28ee46e04..f188e448e 100644 --- a/src/ggml.c +++ b/src/ggml.c @@ -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);