Add missing AVX512 operators for MSVC (#948)

Co-authored-by: Iwan Kawrakow <iwan.kawrakow@gmail.com>
This commit is contained in:
Kawrakow
2025-11-14 06:58:51 +02:00
committed by GitHub
parent 6b9d1bf4b4
commit a1f60b3535
2 changed files with 10 additions and 0 deletions

View File

@@ -1,9 +1,11 @@
#include "iqk_gemm_legacy_quants.h"
#include <type_traits>
#ifdef IQK_IMPLEMENT
#include "ggml-impl.h"
#include "iqk_utils.h"
#define GGML_COMMON_IMPL_C
#include "ggml-common.h"

View File

@@ -80,6 +80,14 @@ static inline float32x4_t v_gelu(float32x4_t x, float32x4_t c1, float32x4_t c2)
#endif // __ARN_NEON
#if defined(__AVX512F__) && defined(_MSC_VER)
#include <immintrin.h>
static inline __m512i operator|(__m512i a, __m512i b) { return _mm512_or_si512(a, b); }
static inline __m512i operator&(__m512i a, __m512i b) { return _mm512_and_si512(a, b); }
static inline __m512i operator^(__m512i a, __m512i b) { return _mm512_xor_si512(a, b); }
#endif
#if defined(__AVX512F__) && defined(__AVX512DQ__)
// copy-pasted from Justine Tunney's contribution to llama.cpp