From 0e683f24ad8ba84ab8da651e0b32ee7a253a1a12 Mon Sep 17 00:00:00 2001 From: Kawrakow Date: Sat, 6 Dec 2025 08:57:50 +0000 Subject: [PATCH] Fix annoying compiler warnings --- common/common.cpp | 12 ++++++++++++ ggml/src/ggml-cuda/unary.cu | 2 ++ 2 files changed, 14 insertions(+) diff --git a/common/common.cpp b/common/common.cpp index ad1bdce2..df5521e7 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -2653,7 +2653,19 @@ bool fs_validate_filename(const std::string & filename) { std::u32string filename_utf32; try { +#if defined(__clang__) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wdeprecated-declarations" +#elif defined(__GNUC__) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif std::wstring_convert, char32_t> converter; +#if defined(__clang__) +# pragma clang diagnostic pop +#elif defined(__GNUC__) +# pragma GCC diagnostic pop +#endif filename_utf32 = converter.from_bytes(filename); // If the reverse conversion mismatches, it means overlong UTF-8 sequences were used, diff --git a/ggml/src/ggml-cuda/unary.cu b/ggml/src/ggml-cuda/unary.cu index 49f22b98..5e105474 100644 --- a/ggml/src/ggml-cuda/unary.cu +++ b/ggml/src/ggml-cuda/unary.cu @@ -38,6 +38,7 @@ static __global__ void silu_f32(const float * x, float * dst, const int k) { dst[i] = x[i] / (1.0f + expf(-x[i])); } +#if 0 static __global__ void swiglu_f32(const float * x, float * dst, const int k, const int ne0, const int64_t nb1) { const int i = blockDim.x*blockIdx.x + threadIdx.x; @@ -49,6 +50,7 @@ static __global__ void swiglu_f32(const float * x, float * dst, const int k, con const int j = row*nb1 + idx; dst[i] = x[j] * x[j + ne0] / (1.0f + expf(-x[j])); } +#endif static __global__ void fused_mul_silu_f32(const float * x, const float * y, float * dst, const int k) { const int i = blockDim.x*blockIdx.x + threadIdx.x;