Skip to content

Commit f9c0adc

Browse files
committed
fix(avx): fix windows build
1 parent ed50e48 commit f9c0adc

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

ggml.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,6 @@ typedef double ggml_float;
188188
#else
189189
#if !defined(__riscv)
190190
#include <immintrin.h>
191-
#if (defined(__GNUC__) && __GNUC__ >= 8) || defined(__INTEL_COMPILER)
192-
#define MM256_SET_M128I(a, b) _mm256_set_m128i((a), (b))
193-
#else
194-
#define MM256_SET_M128I(a, b) _mm256_insertf128_si256(_mm256_castsi128_si256(b), (a), 1)
195-
#endif
196191
#endif
197192
#endif
198193
#endif
@@ -479,6 +474,12 @@ static const size_t CACHE_LINE_SIZE_F32 = CACHE_LINE_SIZE/sizeof(float);
479474
// quantization
480475
//
481476

477+
#if (defined(__GNUC__) && __GNUC__ >= 8) || defined(__INTEL_COMPILER)
478+
#define MM256_SET_M128I(a, b) _mm256_set_m128i((a), (b))
479+
#else
480+
#define MM256_SET_M128I(a, b) _mm256_insertf128_si256(_mm256_castsi128_si256(b), (a), 1)
481+
#endif
482+
482483
#if defined(__AVX__) || defined(__AVX2__) || defined(__AVX512F__) || defined(__SSSE3__)
483484
// multiply int8_t, add results pairwise twice
484485
static inline __m128i mul_sum_i8_pairs(const __m128i x, const __m128i y) {

0 commit comments

Comments
 (0)