Skip to content

Commit e211822

Browse files
Address review comment
1 parent 10955f2 commit e211822

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

tests/test-quantize-fns.cpp

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -176,21 +176,14 @@ int main(int argc, char * argv[]) {
176176
printf("%5s dot product error: %s (%f)\n", ggml_type_name(type), RESULT_STR[failed], vec_dot_error);
177177
}
178178

179-
// Test i8mm path (nrc=2) for supported types
180-
if (type == GGML_TYPE_Q4_0 || type == GGML_TYPE_Q4_1 || type == GGML_TYPE_Q8_0 ||
181-
type == GGML_TYPE_Q4_K || type == GGML_TYPE_Q6_K) {
182-
#if defined(__ARM_FEATURE_MATMUL_INT8)
183-
const float vec_dot_error_i8mm = dot_product_error(qfns, qfns_cpu, test_size, test_data.data(), test_data2.data(), 2);
184-
failed = !(vec_dot_error_i8mm < max_allowed_error);
179+
// Test nrc=2 path for types that support it
180+
if (qfns_cpu->nrows == 2) {
181+
const float vec_dot_error_nrc2 = dot_product_error(qfns, qfns_cpu, test_size, test_data.data(), test_data2.data(), 2);
182+
failed = !(vec_dot_error_nrc2 < max_allowed_error);
185183
num_failed += failed;
186184
if (failed || verbose) {
187-
printf("%5s dot product error (i8mm): %s (%f)\n", ggml_type_name(type), RESULT_STR[failed], vec_dot_error_i8mm);
185+
printf("%5s dot product error (nrc=2): %s (%f)\n", ggml_type_name(type), RESULT_STR[failed], vec_dot_error_nrc2);
188186
}
189-
#else
190-
if (verbose) {
191-
printf("%5s dot product (i8mm): SKIPPED (not supported)\n", ggml_type_name(type));
192-
}
193-
#endif
194187
}
195188
}
196189
}

0 commit comments

Comments
 (0)