ggml-blas: set mkl threads from thread context (#20602)

* ggml blas: set mkl threads from thread context

* add code to run blas locally
This commit is contained in:
Kevin Hannon 2026-03-17 13:16:49 -04:00 committed by GitHub
parent d2ecd2d1cf
commit ee4801e5a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 1 deletions

View file

@ -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++) {