char-fork/llama.cpp

git clone https://git.t4t.associates/char-fork/llama.cpp

Georgi Gerganovggml : fix arm builds, unused var (#26991)1f368f354

char/aliceai-t5-moe
926 B41 linesraw
1#include "ggml-backend-impl.h"
2#include "ggml-feats.h"
3
4#if defined(__aarch64__) || defined(_M_ARM64)
5
6static int ggml_backend_cpu_aarch64_score() {
7    int score = 1;
8    const ggml_feats_arch64_runtime_t af = ggml_feats_get_arch64_runtime();
9    GGML_UNUSED(af);
10
11#ifdef GGML_USE_DOTPROD
12    if (!af.has_dotprod) { return 0; }
13    score += 1<<1;
14#endif
15#ifdef GGML_USE_FP16_VECTOR_ARITHMETIC
16    if (!af.has_fp16) { return 0; }
17    score += 1<<2;
18#endif
19#ifdef GGML_USE_SVE
20    if (!af.has_sve) { return 0; }
21    score += 1<<3;
22#endif
23#ifdef GGML_USE_MATMUL_INT8
24    if (!af.has_i8mm) { return 0; }
25    score += 1<<4;
26#endif
27#ifdef GGML_USE_SVE2
28    if (!af.has_sve2) { return 0; }
29    score += 1<<5;
30#endif
31#ifdef GGML_USE_SME
32    if (!af.has_sme) { return 0; }
33    score += 1<<6;
34#endif
35
36    return score;
37}
38
39GGML_BACKEND_DL_SCORE_IMPL(ggml_backend_cpu_aarch64_score)
40
41# endif // defined(__aarch64__) || defined(_M_ARM64)