File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -9363,7 +9363,7 @@ struct ggml_cgraph ggml_build_forward(struct ggml_tensor * tensor) {
93639363 struct ggml_cgraph result = {
93649364 /*.n_nodes =*/ 0 ,
93659365 /*.n_leafs =*/ 0 ,
9366- /*.n_threads =*/ 0 ,
9366+ /*.n_threads =*/ GGML_DEFAULT_N_THREADS ,
93679367 /*.work_size =*/ 0 ,
93689368 /*.work =*/ NULL ,
93699369 /*.nodes =*/ { NULL },
@@ -9983,8 +9983,8 @@ void ggml_graph_print(const struct ggml_cgraph * cgraph) {
99839983
99849984 GGML_PRINT ("=== GRAPH ===\n" );
99859985
9986- GGML_PRINT_DEBUG ("n_threads = %d\n" , cgraph -> n_threads );
9987- GGML_PRINT_DEBUG ("total work size = %zu bytes\n" ,cgraph -> work_size );
9986+ GGML_PRINT_DEBUG ("n_threads = %d\n" , cgraph -> n_threads );
9987+ GGML_PRINT_DEBUG ("total work size = %zu bytes\n" , cgraph -> work_size );
99889988
99899989 GGML_PRINT ("n_nodes = %d\n" , cgraph -> n_nodes );
99909990 for (int i = 0 ; i < cgraph -> n_nodes ; i ++ ) {
Original file line number Diff line number Diff line change @@ -177,11 +177,12 @@ extern "C" {
177177#include <stddef.h>
178178#include <stdbool.h>
179179
180- #define GGML_MAX_DIMS 4
181- #define GGML_MAX_NODES 4096
182- #define GGML_MAX_PARAMS 16
183- #define GGML_MAX_CONTEXTS 64
184- #define GGML_MAX_OPT 4
180+ #define GGML_MAX_DIMS 4
181+ #define GGML_MAX_NODES 4096
182+ #define GGML_MAX_PARAMS 16
183+ #define GGML_MAX_CONTEXTS 64
184+ #define GGML_MAX_OPT 4
185+ #define GGML_DEFAULT_N_THREADS 4
185186
186187#ifdef __ARM_NEON
187188// we use the built-in 16-bit float type
You can’t perform that action at this time.
0 commit comments