ggml : fix arm builds, unused var (llama/26991)

This commit is contained in:
Georgi Gerganov 2026-08-13 07:57:24 +03:00
parent b0e3297169
commit 406b116813
3 changed files with 5 additions and 4 deletions

View File

@ -5,7 +5,8 @@
static int ggml_backend_cpu_aarch64_score() { static int ggml_backend_cpu_aarch64_score() {
int score = 1; int score = 1;
ggml_feats_arch64_runtime_t af = ggml_get_aarch64_runtime_features(); const ggml_feats_arch64_runtime_t af = ggml_feats_get_arch64_runtime();
GGML_UNUSED(af);
#ifdef GGML_USE_DOTPROD #ifdef GGML_USE_DOTPROD
if (!af.has_dotprod) { return 0; } if (!af.has_dotprod) { return 0; }

View File

@ -184,7 +184,7 @@ static void add_smcus_from_smidr(uint64_t smidr, size_t & num_private, std::map<
} }
static size_t detect_num_smcus() { static size_t detect_num_smcus() {
auto runtime_feat = ggml_get_aarch64_runtime_features(); const auto runtime_feat = ggml_feats_get_arch64_runtime();
if (!runtime_feat.has_sme) { if (!runtime_feat.has_sme) {
return 0; return 0;
} }
@ -310,7 +310,7 @@ static void init_kleidiai_context(void) {
const char *env_threads = getenv("GGML_TOTAL_THREADS"); const char *env_threads = getenv("GGML_TOTAL_THREADS");
const char *env_chunk_mult = getenv("GGML_KLEIDIAI_CHUNK_MULTIPLIER"); const char *env_chunk_mult = getenv("GGML_KLEIDIAI_CHUNK_MULTIPLIER");
auto runtime_feat = ggml_get_aarch64_runtime_features(); const auto runtime_feat = ggml_feats_get_arch64_runtime();
size_t detected_smcus = 0; size_t detected_smcus = 0;

View File

@ -92,7 +92,7 @@ typedef struct ggml_feats_arch64_runtime {
int sve_cnt; int sve_cnt;
} ggml_feats_arch64_runtime_t; } ggml_feats_arch64_runtime_t;
static inline ggml_feats_arch64_runtime_t ggml_get_aarch64_runtime_features(void) { static inline ggml_feats_arch64_runtime_t ggml_feats_get_arch64_runtime(void) {
ggml_feats_arch64_runtime_t runtime_feat = {}; ggml_feats_arch64_runtime_t runtime_feat = {};
#if defined(__linux__) #if defined(__linux__)