mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-10-28 08:31:25 +00:00
ggml : add GGML_DEFAULT_N_THREADS
This commit is contained in:
2
ggml.c
2
ggml.c
@@ -9363,7 +9363,7 @@ struct ggml_cgraph ggml_build_forward(struct ggml_tensor * tensor) {
|
|||||||
struct ggml_cgraph result = {
|
struct ggml_cgraph result = {
|
||||||
/*.n_nodes =*/ 0,
|
/*.n_nodes =*/ 0,
|
||||||
/*.n_leafs =*/ 0,
|
/*.n_leafs =*/ 0,
|
||||||
/*.n_threads =*/ 0,
|
/*.n_threads =*/ GGML_DEFAULT_N_THREADS,
|
||||||
/*.work_size =*/ 0,
|
/*.work_size =*/ 0,
|
||||||
/*.work =*/ NULL,
|
/*.work =*/ NULL,
|
||||||
/*.nodes =*/ { NULL },
|
/*.nodes =*/ { NULL },
|
||||||
|
|||||||
1
ggml.h
1
ggml.h
@@ -182,6 +182,7 @@ extern "C" {
|
|||||||
#define GGML_MAX_PARAMS 16
|
#define GGML_MAX_PARAMS 16
|
||||||
#define GGML_MAX_CONTEXTS 64
|
#define GGML_MAX_CONTEXTS 64
|
||||||
#define GGML_MAX_OPT 4
|
#define GGML_MAX_OPT 4
|
||||||
|
#define GGML_DEFAULT_N_THREADS 4
|
||||||
|
|
||||||
#ifdef __ARM_NEON
|
#ifdef __ARM_NEON
|
||||||
// we use the built-in 16-bit float type
|
// we use the built-in 16-bit float type
|
||||||
|
|||||||
Reference in New Issue
Block a user