diff --git a/README.md b/README.md index 7a61da79..33476381 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ High-performance inference of [OpenAI's Whisper](https://github.com/openai/whisp - Plain C/C++ implementation without dependencies - Apple silicon first-class citizen - optimized via Arm Neon and Accelerate framework - AVX intrinsics support for x86 architectures +- VSX intrinsics support for POWER architectures - Mixed F16 / F32 precision - Low memory usage (Flash Attention + Flash Forward) - Zero memory allocations at runtime diff --git a/ggml.c b/ggml.c index 497e7341..ac37b0be 100644 --- a/ggml.c +++ b/ggml.c @@ -8232,4 +8232,12 @@ int ggml_cpu_has_blas(void) { #endif } +int ggml_cpu_has_vsx(void) { +#if defined(__POWER9_VECTOR__) + return 1; +#else + return 0; +#endif +} + //////////////////////////////////////////////////////////////////////////////// diff --git a/ggml.h b/ggml.h index a217d2d5..d066db90 100644 --- a/ggml.h +++ b/ggml.h @@ -731,6 +731,7 @@ int ggml_cpu_has_f16c(void); int ggml_cpu_has_fp16_va(void); int ggml_cpu_has_wasm_simd(void); int ggml_cpu_has_blas(void); +int ggml_cpu_has_vsx(void); #ifdef __cplusplus } diff --git a/whisper.cpp b/whisper.cpp index e6d050a9..b8c3accd 100644 --- a/whisper.cpp +++ b/whisper.cpp @@ -2582,6 +2582,7 @@ const char * whisper_print_system_info(void) { s += "FP16_VA = " + std::to_string(ggml_cpu_has_fp16_va()) + " | "; s += "WASM_SIMD = " + std::to_string(ggml_cpu_has_wasm_simd()) + " | "; s += "BLAS = " + std::to_string(ggml_cpu_has_blas()) + " | "; + s += "VSX = " + std::to_string(ggml_cpu_has_vsx()) + " | "; return s.c_str(); }