show BLAS OpenMP warnings in all builds using debug prints

This commit is contained in:
slaren 2024-10-11 15:16:17 +02:00
parent bc1bcb1c9d
commit 32d1c6ea13

View file

@ -297,14 +297,14 @@ ggml_backend_t ggml_backend_blas_init(void) {
/* .context = */ ctx, /* .context = */ ctx,
}; };
#if !defined(NDEBUG) && defined(OPENBLAS_VERSION) && defined(GGML_USE_OPENMP) #if defined(OPENBLAS_VERSION) && defined(GGML_USE_OPENMP)
if (openblas_get_parallel() != OPENBLAS_OPENMP) { if (openblas_get_parallel() != OPENBLAS_OPENMP) {
GGML_LOG_WARN("%s: warning: ggml is using OpenMP, but OpenBLAS was compiled without OpenMP support\n", __func__); GGML_LOG_DEBUG("%s: warning: ggml is using OpenMP, but OpenBLAS was compiled without OpenMP support\n", __func__);
} }
#endif #endif
#if !defined(NDEBUG) && defined(BLIS_ENABLE_CBLAS) && defined(GGML_USE_OPENMP) && !defined(BLIS_ENABLE_OPENMP) #if defined(BLIS_ENABLE_CBLAS) && defined(GGML_USE_OPENMP) && !defined(BLIS_ENABLE_OPENMP)
GGML_LOG_WARN("%s: warning: ggml is using OpenMP, but BLIS was compiled without OpenMP support\n", __func__); GGML_LOG_DEBUG("%s: warning: ggml is using OpenMP, but BLIS was compiled without OpenMP support\n", __func__);
#endif #endif
return backend; return backend;