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) {
9363
9363
struct ggml_cgraph result = {
9364
9364
/*.n_nodes =*/ 0 ,
9365
9365
/*.n_leafs =*/ 0 ,
9366
- /*.n_threads =*/ 0 ,
9366
+ /*.n_threads =*/ GGML_DEFAULT_N_THREADS ,
9367
9367
/*.work_size =*/ 0 ,
9368
9368
/*.work =*/ NULL ,
9369
9369
/*.nodes =*/ { NULL },
@@ -9983,8 +9983,8 @@ void ggml_graph_print(const struct ggml_cgraph * cgraph) {
9983
9983
9984
9984
GGML_PRINT ("=== GRAPH ===\n" );
9985
9985
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 );
9988
9988
9989
9989
GGML_PRINT ("n_nodes = %d\n" , cgraph -> n_nodes );
9990
9990
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" {
177
177
#include <stddef.h>
178
178
#include <stdbool.h>
179
179
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
185
186
186
187
#ifdef __ARM_NEON
187
188
// we use the built-in 16-bit float type
You can’t perform that action at this time.
0 commit comments