Skip to content

Commit 47f4875

Browse files
committed
Fix x64 code
1 parent 3aaf780 commit 47f4875

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

libs/simdvec/native/src/vec/c/amd64/vec_1.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ static inline int64_t index(const int32_t i, const int32_t* offsets) {
199199
}
200200

201201
EXPORT void vec_dot7u_bulk(const int8_t* a, const int8_t* b, const int32_t dims, const int32_t count, f32_t* results) {
202-
dot7u_inner_bulk<identity>(a, b, dims, dims, NULL, count, 1.0f, results);
202+
dot7u_inner_bulk<identity>(a, b, dims, dims, NULL, count, results);
203203
}
204204

205205

libs/simdvec/native/src/vec/c/amd64/vec_2.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@
1616
#include <math.h>
1717
#include "vec.h"
1818

19+
// AVX-512 code
20+
#ifdef __clang__
21+
#pragma clang attribute push(__attribute__((target("arch=skylake-avx512"))), apply_to=function)
22+
#elif __GNUC__
23+
#pragma GCC push_options
24+
#pragma GCC target ("arch=skylake-avx512")
25+
#endif
26+
1927
// Includes for intrinsics
2028
#ifdef _MSC_VER
2129
#include <intrin.h>
@@ -28,14 +36,6 @@
2836
#include <emmintrin.h>
2937
#include <immintrin.h>
3038

31-
// AVX-512 code
32-
#ifdef __clang__
33-
#pragma clang attribute push(__attribute__((target("arch=skylake-avx512"))), apply_to=function)
34-
#elif __GNUC__
35-
#pragma GCC push_options
36-
#pragma GCC target ("arch=skylake-avx512")
37-
#endif
38-
3939
#ifndef STRIDE_BYTES_LEN
4040
#define STRIDE_BYTES_LEN sizeof(__m512i) // Must be a power of 2
4141
#endif
@@ -165,7 +165,7 @@ static inline int64_t index(const int32_t i, const int32_t* offsets) {
165165
}
166166

167167
EXPORT void vec_dot7u_bulk_2(const int8_t* a, const int8_t* b, const int32_t dims, const int32_t count, f32_t* results) {
168-
dot7u_inner_bulk<identity>(a, b, dims, dims, NULL, count, 1.0f, results);
168+
dot7u_inner_bulk<identity>(a, b, dims, dims, NULL, count, results);
169169
}
170170

171171

0 commit comments

Comments
 (0)