Skip to content

Commit c9fcfb9

Browse files
ikawrakowIwan Kawrakow
andauthored
Fix annoying compiler warnings (#1042)
Co-authored-by: Iwan Kawrakow <iwan.kawrakow@gmail.com>
1 parent 87f6943 commit c9fcfb9

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

common/common.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2653,7 +2653,19 @@ bool fs_validate_filename(const std::string & filename) {
26532653

26542654
std::u32string filename_utf32;
26552655
try {
2656+
#if defined(__clang__)
2657+
# pragma clang diagnostic push
2658+
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
2659+
#elif defined(__GNUC__)
2660+
# pragma GCC diagnostic push
2661+
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
2662+
#endif
26562663
std::wstring_convert<std::codecvt_utf8<char32_t>, char32_t> converter;
2664+
#if defined(__clang__)
2665+
# pragma clang diagnostic pop
2666+
#elif defined(__GNUC__)
2667+
# pragma GCC diagnostic pop
2668+
#endif
26572669
filename_utf32 = converter.from_bytes(filename);
26582670

26592671
// If the reverse conversion mismatches, it means overlong UTF-8 sequences were used,

ggml/src/ggml-cuda/unary.cu

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ static __global__ void silu_f32(const float * x, float * dst, const int k) {
3838
dst[i] = x[i] / (1.0f + expf(-x[i]));
3939
}
4040

41+
#if 0
4142
static __global__ void swiglu_f32(const float * x, float * dst, const int k, const int ne0, const int64_t nb1) {
4243
const int i = blockDim.x*blockIdx.x + threadIdx.x;
4344

@@ -49,6 +50,7 @@ static __global__ void swiglu_f32(const float * x, float * dst, const int k, con
4950
const int j = row*nb1 + idx;
5051
dst[i] = x[j] * x[j + ne0] / (1.0f + expf(-x[j]));
5152
}
53+
#endif
5254

5355
static __global__ void fused_mul_silu_f32(const float * x, const float * y, float * dst, const int k) {
5456
const int i = blockDim.x*blockIdx.x + threadIdx.x;

0 commit comments

Comments
 (0)