ggml : simplify the SIMD code (#324)

* ggml : simplify the SIMD code

* ggml : generic reduce for all register sizes + comments
This commit is contained in:
Georgi Gerganov 2022-12-24 10:22:28 +02:00 committed by GitHub
parent 331c0bbddc
commit ac521a566e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 496 additions and 764 deletions

1166
ggml.c

File diff suppressed because it is too large Load Diff

1
ggml.h
View File

@ -724,6 +724,7 @@ enum ggml_opt_result ggml_opt(
int ggml_cpu_has_avx(void);
int ggml_cpu_has_avx2(void);
int ggml_cpu_has_avx512(void);
int ggml_cpu_has_fma(void);
int ggml_cpu_has_neon(void);
int ggml_cpu_has_arm_fma(void);
int ggml_cpu_has_f16c(void);

View File

@ -2555,6 +2555,7 @@ const char * whisper_print_system_info(void) {
s += "AVX = " + std::to_string(ggml_cpu_has_avx()) + " | ";
s += "AVX2 = " + std::to_string(ggml_cpu_has_avx2()) + " | ";
s += "AVX512 = " + std::to_string(ggml_cpu_has_avx512()) + " | ";
s += "FMA = " + std::to_string(ggml_cpu_has_fma()) + " | ";
s += "NEON = " + std::to_string(ggml_cpu_has_neon()) + " | ";
s += "ARM_FMA = " + std::to_string(ggml_cpu_has_arm_fma()) + " | ";
s += "F16C = " + std::to_string(ggml_cpu_has_f16c()) + " | ";