Skip to content

Commit 26b5685

Browse files
committed
rm duplicated func
Signed-off-by: jiqing-feng <[email protected]>
1 parent bb3ac8d commit 26b5685

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

csrc/cpu_ops.cpp

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -14,38 +14,6 @@ using namespace BinSearch;
1414
#if defined(__AVX512F__)
1515
#include <immintrin.h>
1616

17-
#ifdef _MSC_VER
18-
#include <intrin.h>
19-
20-
static inline bool has_avx512f() {
21-
static bool v = [] {
22-
int info[4];
23-
__cpuidex(info, 7, 0);
24-
return (info[1] & (1 << 16)) != 0; // EBX bit16 AVX512F
25-
}();
26-
return v;
27-
}
28-
29-
static inline bool has_avx512bf16() {
30-
static bool v = [] {
31-
int info[4];
32-
__cpuidex(info, 7, 1);
33-
return (info[0] & (1 << 5)) != 0; // EAX bit5 AVX512_BF16
34-
}();
35-
return v;
36-
}
37-
#else
38-
bool has_avx512f() {
39-
static const bool supported_avx512f = __builtin_cpu_supports("avx512f");
40-
return supported_avx512f;
41-
}
42-
43-
bool has_avx512bf16() {
44-
static const bool supported_avx512bf16 = __builtin_cpu_supports("avx512bf16");
45-
return supported_avx512bf16;
46-
}
47-
#endif
48-
4917
inline __m256i cvt_fp32_to_fp16(const __m512 src) {
5018
return _mm512_cvtps_ph(src, (_MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC));
5119
}

0 commit comments

Comments
 (0)