Skip to content

Commit 9eaba38

Browse files
committed
add MATMUL_INT8 capability to system_info
1 parent 315f35f commit 9eaba38

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

common/common.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1526,6 +1526,7 @@ void dump_non_result_info_yaml(FILE * stream, const gpt_params & params, const l
15261526
fprintf(stream, "cpu_has_blas: %s\n", ggml_cpu_has_blas() ? "true" : "false");
15271527
fprintf(stream, "cpu_has_sse3: %s\n", ggml_cpu_has_sse3() ? "true" : "false");
15281528
fprintf(stream, "cpu_has_vsx: %s\n", ggml_cpu_has_vsx() ? "true" : "false");
1529+
fprintf(stream, "cpu_has_matmul_int8: %s\n", ggml_cpu_has_matmul_int8() ? "true" : "false");
15291530

15301531
#ifdef NDEBUG
15311532
fprintf(stream, "debug: false\n");

ggml.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20379,4 +20379,12 @@ int ggml_cpu_has_vsx(void) {
2037920379
#endif
2038020380
}
2038120381

20382+
int ggml_cpu_has_matmul_int8(void) {
20383+
#if defined(__ARM_FEATURE_MATMUL_INT8)
20384+
return 1;
20385+
#else
20386+
return 0;
20387+
#endif
20388+
}
20389+
2038220390
////////////////////////////////////////////////////////////////////////////////

ggml.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2270,6 +2270,7 @@ extern "C" {
22702270
GGML_API int ggml_cpu_has_sse3 (void);
22712271
GGML_API int ggml_cpu_has_ssse3 (void);
22722272
GGML_API int ggml_cpu_has_vsx (void);
2273+
GGML_API int ggml_cpu_has_matmul_int8(void);
22732274

22742275
//
22752276
// Internal types and functions exposed for tests and benchmarks

llama.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11062,6 +11062,7 @@ const char * llama_print_system_info(void) {
1106211062
s += "SSE3 = " + std::to_string(ggml_cpu_has_sse3()) + " | ";
1106311063
s += "SSSE3 = " + std::to_string(ggml_cpu_has_ssse3()) + " | ";
1106411064
s += "VSX = " + std::to_string(ggml_cpu_has_vsx()) + " | ";
11065+
s += "MATMUL_INT8 = " + std::to_string(ggml_cpu_has_matmul_int8()) + " | ";
1106511066

1106611067
return s.c_str();
1106711068
}

0 commit comments

Comments
 (0)