]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
whisper : document POWER VSX support
authorThomas Fitzsimmons <redacted>
Thu, 5 Jan 2023 04:00:30 +0000 (23:00 -0500)
committerGeorgi Gerganov <redacted>
Thu, 5 Jan 2023 21:53:00 +0000 (23:53 +0200)
README.md
ggml.c
ggml.h
whisper.cpp

index 7a61da798b594056364b588315e0fc1444feefd2..334763814cfbb78a3ac9602f2456e84fc44321d0 100644 (file)
--- 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 497e7341950c22bb7200151dde46e3a421b73fdb..ac37b0beef9afeb490c523557b639aeda207f6a7 100644 (file)
--- 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 a217d2d5f94335ea64612ff2e6f254317cd1d8d6..d066db90ea5e49c395ab9aba164682db0bce35c3 100644 (file)
--- 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
 }
index e6d050a914549cecd14e778cfec0b1406ee5ec24..b8c3accd2459da1869a1cd81e4fa711a022ea9c2 100644 (file)
@@ -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();
 }