From: Kevin Hannon Date: Tue, 17 Mar 2026 17:16:49 +0000 (-0400) Subject: ggml-blas: set mkl threads from thread context (llama/20602) X-Git-Tag: upstream/1.9.2~711 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=906aef3da84894d4b59e4f94d5fe69bc6fd0f01b;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp ggml-blas: set mkl threads from thread context (llama/20602) * ggml blas: set mkl threads from thread context * add code to run blas locally --- diff --git a/ggml/src/ggml-blas/ggml-blas.cpp b/ggml/src/ggml-blas/ggml-blas.cpp index 5de64b81..e7a1763b 100644 --- a/ggml/src/ggml-blas/ggml-blas.cpp +++ b/ggml/src/ggml-blas/ggml-blas.cpp @@ -121,6 +121,8 @@ static void ggml_backend_blas_mul_mat(ggml_backend_blas_context * ctx, struct gg bli_thread_set_num_threads(ctx->n_threads); #elif defined(GGML_BLAS_USE_NVPL) nvpl_blas_set_num_threads(ctx->n_threads); +#elif defined(GGML_BLAS_USE_MKL) + mkl_set_num_threads(ctx->n_threads); #endif for (int64_t i13 = 0; i13 < ne13; i13++) {