Add missing AVX512 operators for MSVC

This commit is contained in:
Iwan Kawrakow
2025-11-13 09:09:58 +02:00
parent 8a8de91a42
commit e1d669fb34
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