File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
ggml/src/ggml-cpu/arch/arm Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -61,29 +61,33 @@ static int ggml_backend_cpu_aarch64_score() {
61
61
int score = 1 ;
62
62
aarch64_features af;
63
63
64
+ // Bits 2-8 are used to rank backends by architecture or core when they
65
+ // otherwise have identical features.
66
+
67
+ // Bits 9+: Features always trump architecture or core.
64
68
#ifdef GGML_USE_DOTPROD
65
69
if (!af.has_dotprod ) { return 0 ; }
66
- score += 1 <<1 ;
70
+ score += 1 <<8 ;
67
71
#endif
68
72
#ifdef GGML_USE_FP16_VECTOR_ARITHMETIC
69
73
if (!af.has_fp16_va ) { return 0 ; }
70
- score += 1 <<2 ;
74
+ score += 1 <<9 ;
71
75
#endif
72
76
#ifdef GGML_USE_SVE
73
77
if (!af.has_sve ) { return 0 ; }
74
- score += 1 <<3 ;
78
+ score += 1 <<10 ;
75
79
#endif
76
80
#ifdef GGML_USE_MATMUL_INT8
77
81
if (!af.has_i8mm ) { return 0 ; }
78
- score += 1 <<4 ;
82
+ score += 1 <<11 ;
79
83
#endif
80
84
#ifdef GGML_USE_SVE2
81
85
if (!af.has_sve2 ) { return 0 ; }
82
- score += 1 <<5 ;
86
+ score += 1 <<12 ;
83
87
#endif
84
88
#ifdef GGML_USE_SME
85
89
if (!af.has_sme ) { return 0 ; }
86
- score += 1 <<6 ;
90
+ score += 1 <<13 ;
87
91
#endif
88
92
89
93
return score;
You can’t perform that action at this time.
0 commit comments