From 0ecc317e3040331a3f2d0e96d90259c1267d368d Mon Sep 17 00:00:00 2001 From: Pradeep Rao Date: Thu, 1 Oct 2026 11:05:01 +0530 Subject: [PATCH] BLAS : Document AOCL-BLAS build and label the device AOCL-BLAS (llama/29640) * BLAS : Document AOCL-BLAS build and label the device AOCL-BLAS * AOCL-Blas : Add an AOCL-BLAS Quick Start and drop the fixed version path * AOCL-BLAS doc : Note on ZenDNN --- ggml/src/ggml-blas/CMakeLists.txt | 7 +++++++ ggml/src/ggml-blas/ggml-blas.cpp | 2 ++ 2 files changed, 9 insertions(+) diff --git a/ggml/src/ggml-blas/CMakeLists.txt b/ggml/src/ggml-blas/CMakeLists.txt index c27dc174c..5b46b79d5 100644 --- a/ggml/src/ggml-blas/CMakeLists.txt +++ b/ggml/src/ggml-blas/CMakeLists.txt @@ -84,10 +84,17 @@ if (BLAS_FOUND) add_compile_definitions(GGML_BLAS_USE_OPENBLAS) endif() + # Vendors with the BLIS API take GGML_BLAS_USE_BLIS (blis.h, bli_thread_set_num_threads). + # AOCL also takes GGML_BLAS_USE_AOCL so its device label is AOCL-BLAS, not BLIS. + # Neither flag selects the linked library; FindBLAS does that from GGML_BLAS_VENDOR. if ("${GGML_BLAS_VENDOR}" MATCHES "FLAME" OR "${GGML_BLAS_VENDOR}" MATCHES "AOCL" OR "${GGML_BLAS_VENDOR}" MATCHES "AOCL_mt") add_compile_definitions(GGML_BLAS_USE_BLIS) endif() + if ("${GGML_BLAS_VENDOR}" MATCHES "AOCL" OR "${GGML_BLAS_VENDOR}" MATCHES "AOCL_mt") + add_compile_definitions(GGML_BLAS_USE_AOCL) + endif() + if ("${GGML_BLAS_VENDOR}" MATCHES "NVPL") add_compile_definitions(GGML_BLAS_USE_NVPL) endif() diff --git a/ggml/src/ggml-blas/ggml-blas.cpp b/ggml/src/ggml-blas/ggml-blas.cpp index e4b5bd254..6feb370bb 100644 --- a/ggml/src/ggml-blas/ggml-blas.cpp +++ b/ggml/src/ggml-blas/ggml-blas.cpp @@ -330,6 +330,8 @@ static const char * ggml_backend_blas_device_get_description(ggml_backend_dev_t return "Accelerate"; #elif defined(GGML_BLAS_USE_MKL) return "MKL"; + #elif defined(GGML_BLAS_USE_AOCL) + return "AOCL-BLAS"; #elif defined(GGML_BLAS_USE_BLIS) return "BLIS"; #elif defined(GGML_BLAS_USE_NVPL)