mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-06-27 12:05:03 +00:00
whisper: remove MSVC warnings pragmas (whisper/3090)
* ggml : remove MSVC warnings pragmas This commit removes the MSVC-specific pragmas as these are now handled in ggml/CMakeLists.txt. * whisper : remove MSVC warning pragmas This commit removes the MSVC-specific pragmas. These are now handled in the ggml/CMakeLists.txt file.
This commit is contained in:
committed by
Georgi Gerganov
parent
bba9d945c1
commit
13b0a04597
@ -366,6 +366,8 @@ if (MSVC)
|
|||||||
/wd4005 # Macro redefinition
|
/wd4005 # Macro redefinition
|
||||||
/wd4244 # Conversion from one type to another type, possible loss of data
|
/wd4244 # Conversion from one type to another type, possible loss of data
|
||||||
/wd4267 # Conversion from 'size_t' to a smaller type, possible loss of data
|
/wd4267 # Conversion from 'size_t' to a smaller type, possible loss of data
|
||||||
|
/wd4996 # Disable POSIX deprecation warnings
|
||||||
|
/wd4702 # Unreachable code warnings
|
||||||
)
|
)
|
||||||
function(disable_msvc_warnings target_name)
|
function(disable_msvc_warnings target_name)
|
||||||
if(TARGET ${target_name})
|
if(TARGET ${target_name})
|
||||||
|
@ -72,8 +72,6 @@ static_assert(sizeof(block_iq4_nlx4) == 4 * sizeof(ggml_half) + QK4_NL * 2, "wro
|
|||||||
|
|
||||||
#if defined(__GNUC__)
|
#if defined(__GNUC__)
|
||||||
#pragma GCC diagnostic ignored "-Woverlength-strings"
|
#pragma GCC diagnostic ignored "-Woverlength-strings"
|
||||||
#elif defined(_MSC_VER)
|
|
||||||
#pragma warning(disable: 4244 4267) // possible loss of data
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define UNUSED GGML_UNUSED
|
#define UNUSED GGML_UNUSED
|
||||||
|
@ -20,12 +20,6 @@
|
|||||||
#define GROUP_MAX_EPS_IQ1_M 1e-7f
|
#define GROUP_MAX_EPS_IQ1_M 1e-7f
|
||||||
#define GROUP_MAX_EPS_IQ1_S 1e-12f
|
#define GROUP_MAX_EPS_IQ1_S 1e-12f
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
|
||||||
// disable "possible loss of data" to avoid warnings for hundreds of casts
|
|
||||||
// we should just be careful :)
|
|
||||||
#pragma warning(disable: 4244 4267)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define UNUSED GGML_UNUSED
|
#define UNUSED GGML_UNUSED
|
||||||
|
|
||||||
// some compilers don't provide _mm256_set_m128i, e.g. gcc 7
|
// some compilers don't provide _mm256_set_m128i, e.g. gcc 7
|
||||||
|
@ -50,19 +50,6 @@
|
|||||||
#include "llamafile/sgemm.h"
|
#include "llamafile/sgemm.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
|
||||||
// disable "possible loss of data" to avoid hundreds of casts
|
|
||||||
// we should just be careful :)
|
|
||||||
#pragma warning(disable: 4244 4267)
|
|
||||||
|
|
||||||
// disable POSIX deprecation warnings
|
|
||||||
// these functions are never going away, anyway
|
|
||||||
#pragma warning(disable: 4996)
|
|
||||||
|
|
||||||
// unreachable code because of multiple instances of code after GGML_ABORT
|
|
||||||
#pragma warning(disable: 4702)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Note: once we move threading into a separate C++ file
|
// Note: once we move threading into a separate C++ file
|
||||||
// will use std::hardware_destructive_interference_size instead of hardcoding it here
|
// will use std::hardware_destructive_interference_size instead of hardcoding it here
|
||||||
// and we'll use C++ attribute syntax.
|
// and we'll use C++ attribute syntax.
|
||||||
|
@ -8,19 +8,6 @@
|
|||||||
|
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
|
||||||
// disable "possible loss of data" to avoid hundreds of casts
|
|
||||||
// we should just be careful :)
|
|
||||||
#pragma warning(disable: 4244 4267)
|
|
||||||
|
|
||||||
// disable POSIX deprecation warnings
|
|
||||||
// these functions are never going away, anyway
|
|
||||||
#pragma warning(disable: 4996)
|
|
||||||
|
|
||||||
// unreachable code because of multiple instances of code after GGML_ABORT
|
|
||||||
#pragma warning(disable: 4702)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ggml_compute_forward_dup
|
// ggml_compute_forward_dup
|
||||||
|
|
||||||
static void ggml_compute_forward_dup_same_cont(
|
static void ggml_compute_forward_dup_same_cont(
|
||||||
|
@ -2,12 +2,6 @@
|
|||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
|
||||||
// disable "possible loss of data" to avoid hundreds of casts
|
|
||||||
// we should just be careful :)
|
|
||||||
#pragma warning(disable: 4244 4267)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// precomputed gelu table for f16 (128 KB)
|
// precomputed gelu table for f16 (128 KB)
|
||||||
ggml_fp16_t ggml_table_gelu_f16[1 << 16];
|
ggml_fp16_t ggml_table_gelu_f16[1 << 16];
|
||||||
|
|
||||||
|
@ -130,10 +130,6 @@ static int ggml_cuda_highest_compiled_arch(const int arch) {
|
|||||||
|
|
||||||
#define MATRIX_ROW_PADDING 512 // last row of quant. matrices is a multiple of this to avoid out-of-bounds memory accesses
|
#define MATRIX_ROW_PADDING 512 // last row of quant. matrices is a multiple of this to avoid out-of-bounds memory accesses
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
|
||||||
#pragma warning(disable: 4244 4267) // possible loss of data
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define GGML_CUDA_MAX_STREAMS 8
|
#define GGML_CUDA_MAX_STREAMS 8
|
||||||
|
|
||||||
[[noreturn]]
|
[[noreturn]]
|
||||||
|
@ -19,12 +19,6 @@
|
|||||||
#define GROUP_MAX_EPS_IQ1_M 1e-7f
|
#define GROUP_MAX_EPS_IQ1_M 1e-7f
|
||||||
#define GROUP_MAX_EPS_IQ1_S 1e-12f
|
#define GROUP_MAX_EPS_IQ1_S 1e-12f
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
|
||||||
// disable "possible loss of data" to avoid warnings for hundreds of casts
|
|
||||||
// we should just be careful :)
|
|
||||||
#pragma warning(disable: 4244 4267)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define UNUSED GGML_UNUSED
|
#define UNUSED GGML_UNUSED
|
||||||
|
|
||||||
// reference implementation for deterministic creation of model files
|
// reference implementation for deterministic creation of model files
|
||||||
|
@ -80,10 +80,6 @@ extern int g_ggml_sycl_disable_optimize;
|
|||||||
// max batch size to use MMQ kernels when tensor cores are available
|
// max batch size to use MMQ kernels when tensor cores are available
|
||||||
#define MMQ_MAX_BATCH_SIZE 32
|
#define MMQ_MAX_BATCH_SIZE 32
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
|
||||||
#pragma warning(disable : 4244 4267) // possible loss of data
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// dmmv = dequantize_mul_mat_vec
|
// dmmv = dequantize_mul_mat_vec
|
||||||
#ifndef GGML_SYCL_DMMV_X
|
#ifndef GGML_SYCL_DMMV_X
|
||||||
#define GGML_SYCL_DMMV_X 32
|
#define GGML_SYCL_DMMV_X 32
|
||||||
|
Reference in New Issue
Block a user