From: Georgi Gerganov Date: Tue, 5 Sep 2023 13:37:55 +0000 (+0300) Subject: whisper : minor sync X-Git-Tag: upstream/0.0.1642~1249 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=8df5ffcd950ebdca5f1d37a0fee662173ce9105c;p=pkg%2Fggml%2Fsources%2Fggml whisper : minor sync --- diff --git a/examples/whisper/whisper.cpp b/examples/whisper/whisper.cpp index b50c86d0..3192fbc6 100644 --- a/examples/whisper/whisper.cpp +++ b/examples/whisper/whisper.cpp @@ -3,7 +3,7 @@ #include "coreml/whisper-encoder.h" #endif -#if WHISPER_USE_OPENVINO +#ifdef WHISPER_USE_OPENVINO #include "openvino/whisper-openvino-encoder.h" #endif @@ -731,7 +731,13 @@ static void whisper_default_log(const char * text) { static whisper_log_callback whisper_log = whisper_default_log; -// TODO: fix compile warning about "format string is not a string literal" +#ifdef __GNUC__ +#ifdef __MINGW32__ +__attribute__((gnu_format(printf, 1, 2))) +#else +__attribute__((format(printf, 1, 2))) +#endif +#endif static void log(const char * fmt, ...) { if (!whisper_log) return; char buf[1024]; @@ -2445,7 +2451,7 @@ static void fft(const std::vector & in, std::vector & out) { } static bool hann_window(int length, bool periodic, std::vector & output) { - if (output.size() < length) { + if (output.size() < static_cast(length)) { output.resize(length); } int offset = -1; diff --git a/src/ggml.c b/src/ggml.c index 7c2b64dc..63a22223 100644 --- a/src/ggml.c +++ b/src/ggml.c @@ -298,12 +298,14 @@ typedef double ggml_float; #if defined(_MSC_VER) || defined(__MINGW32__) #include #else +#if defined(__AVX__) || defined(__AVX2__) || defined(__AVX512F__) || defined(__SSSE3__) || defined(__SSE3__) #if !defined(__riscv) #include #endif #endif #endif #endif +#endif #ifdef __riscv_v_intrinsic #include