diff options
author | Maƫl Kerbiriou <m431.kerbiriou@gmail.com> | 2023-03-29 18:10:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-29 19:10:07 +0300 |
commit | 41318d708ed196ff727dce14d263a64b23c7333d (patch) | |
tree | 4aebe8deb2b4ae9c069d89d355f2c769807ffe46 | |
parent | a6956b25a1c783e5e96fe06c9c00438f846ef047 (diff) |
llama : use the same threshold for OpenBLAS and ggml thread limiting (#577)
-rw-r--r-- | llama.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -856,7 +856,7 @@ static bool llama_eval_internal( // for big prompts, if BLAS is enabled, it is better to use only one thread // otherwise, the threads are spin-lock waiting for the BLAS calls and are degrading the performance ggml_cgraph gf = {}; - gf.n_threads = N > 255 && ggml_cpu_has_blas() ? 1 : n_threads; + gf.n_threads = N >= 32 && ggml_cpu_has_blas() ? 1 : n_threads; struct ggml_tensor * embd = ggml_new_tensor_1d(ctx0, GGML_TYPE_I32, N); memcpy(embd->data, tokens, N*ggml_element_size(embd)); |