From 3cf0f5468fb5dcea17aff4d97cc097267bf7a4ce Mon Sep 17 00:00:00 2001 From: Kawrakow Date: Fri, 19 Jun 2026 15:24:24 +0000 Subject: [PATCH] Also these --- ggml/src/ggml.c | 4 ---- src/llama-context.h | 3 --- src/llama-dflash.cpp | 5 ----- src/llama.cpp | 24 ------------------------ 4 files changed, 36 deletions(-) diff --git a/ggml/src/ggml.c b/ggml/src/ggml.c index 2c1e3667..a865aef6 100644 --- a/ggml/src/ggml.c +++ b/ggml/src/ggml.c @@ -30051,11 +30051,7 @@ int ggml_cpu_has_wasm_simd(void) { } int ggml_cpu_has_blas(void) { -#if defined(GGML_USE_BLAS) || defined(GGML_USE_CUDA) || defined(GGML_USE_VULKAN) || defined(GGML_USE_SYCL) - return 1; -#else return 0; -#endif } int ggml_cpu_has_cuda(void) { diff --git a/src/llama-context.h b/src/llama-context.h index b8a2b4cc..5d38a12a 100644 --- a/src/llama-context.h +++ b/src/llama-context.h @@ -218,9 +218,6 @@ struct llama_context { std::vector backends; #ifdef GGML_USE_METAL ggml_backend_t backend_metal = nullptr; -#endif -#ifdef GGML_USE_BLAS - ggml_backend_t backend_blas = nullptr; #endif ggml_backend_t backend_cpu = nullptr; diff --git a/src/llama-dflash.cpp b/src/llama-dflash.cpp index aa912a96..549a8dd1 100644 --- a/src/llama-dflash.cpp +++ b/src/llama-dflash.cpp @@ -248,11 +248,6 @@ static void llama_graph_compute_sched( ggml_backend_cpu_set_n_threads(lctx.backend_cpu, n_threads); ggml_backend_cpu_set_abort_callback(lctx.backend_cpu, lctx.abort_callback, lctx.abort_callback_data); } -#ifdef GGML_USE_BLAS - if (lctx.backend_blas != nullptr) { - ggml_backend_blas_set_n_threads(lctx.backend_blas, n_threads); - } -#endif ggml_backend_sched_graph_compute_async(sched, gf); } diff --git a/src/llama.cpp b/src/llama.cpp index 0a20563f..198d4e45 100644 --- a/src/llama.cpp +++ b/src/llama.cpp @@ -51,10 +51,6 @@ void llama_set_mtp_target_context(struct llama_context * ctx, struct llama_conte # include "ggml-cann.h" #endif -#ifdef GGML_USE_BLAS -# include "ggml-blas.h" -#endif - #ifdef GGML_USE_METAL # include "ggml-metal.h" #endif @@ -5010,11 +5006,6 @@ static void llama_graph_compute( ggml_backend_cpu_set_n_threads(lctx.backend_cpu, n_threads); ggml_backend_cpu_set_abort_callback(lctx.backend_cpu, lctx.abort_callback, lctx.abort_callback_data); } -#ifdef GGML_USE_BLAS - if (lctx.backend_blas != nullptr) { - ggml_backend_blas_set_n_threads(lctx.backend_blas, n_threads); - } -#endif ggml_backend_sched_graph_compute_async(lctx.sched, gf); @@ -5036,11 +5027,6 @@ static void llama_graph_compute_sched( ggml_backend_cpu_set_n_threads(lctx.backend_cpu, n_threads); ggml_backend_cpu_set_abort_callback(lctx.backend_cpu, lctx.abort_callback, lctx.abort_callback_data); } -#ifdef GGML_USE_BLAS - if (lctx.backend_blas != nullptr) { - ggml_backend_blas_set_n_threads(lctx.backend_blas, n_threads); - } -#endif ggml_backend_sched_graph_compute_async(sched, gf); } @@ -7223,15 +7209,6 @@ struct llama_context * llama_init_from_model( } #endif -#ifdef GGML_USE_BLAS - ctx->backend_blas = ggml_backend_blas_init(); - if (ctx->backend_blas == nullptr) { - LLAMA_LOG_WARN("%s: failed to initialize BLAS backend\n", __func__); - } else { - ggml_backend_add_from_device(ctx, ctx->backend_blas); - } -#endif - #if defined(GGML_USE_RPC) if (model->n_gpu_layers > 0) { for (const auto & device : model->rpc_servers) { @@ -10988,7 +10965,6 @@ const char * llama_print_system_info(void) { s += "F16C = " + std::to_string(ggml_cpu_has_f16c()) + " | "; s += "FP16_VA = " + std::to_string(ggml_cpu_has_fp16_va()) + " | "; s += "WASM_SIMD = " + std::to_string(ggml_cpu_has_wasm_simd()) + " | "; - s += "BLAS = " + std::to_string(ggml_cpu_has_blas()) + " | "; s += "SSE3 = " + std::to_string(ggml_cpu_has_sse3()) + " | "; s += "SSSE3 = " + std::to_string(ggml_cpu_has_ssse3()) + " | "; s += "VSX = " + std::to_string(ggml_cpu_has_vsx()) + " | ";