mirror of
https://github.com/ikawrakow/ik_llama.cpp.git
synced 2026-04-30 19:31:48 +00:00
Add missing AVX512 operators for MSVC (#948)
Co-authored-by: Iwan Kawrakow <iwan.kawrakow@gmail.com>
This commit is contained in:
@@ -1,9 +1,11 @@
|
|||||||
#include "iqk_gemm_legacy_quants.h"
|
#include "iqk_gemm_legacy_quants.h"
|
||||||
|
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
||||||
#ifdef IQK_IMPLEMENT
|
#ifdef IQK_IMPLEMENT
|
||||||
|
|
||||||
#include "ggml-impl.h"
|
#include "ggml-impl.h"
|
||||||
|
#include "iqk_utils.h"
|
||||||
|
|
||||||
#define GGML_COMMON_IMPL_C
|
#define GGML_COMMON_IMPL_C
|
||||||
#include "ggml-common.h"
|
#include "ggml-common.h"
|
||||||
|
|||||||
@@ -80,6 +80,14 @@ static inline float32x4_t v_gelu(float32x4_t x, float32x4_t c1, float32x4_t c2)
|
|||||||
|
|
||||||
#endif // __ARN_NEON
|
#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__)
|
#if defined(__AVX512F__) && defined(__AVX512DQ__)
|
||||||
|
|
||||||
// copy-pasted from Justine Tunney's contribution to llama.cpp
|
// copy-pasted from Justine Tunney's contribution to llama.cpp
|
||||||
|
|||||||
Reference in New Issue
Block a user