File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -298,6 +298,7 @@ static inline bool has_avx512f() {
298298 return v;
299299}
300300
301+ #if defined(__AVX512BF16__)
301302static inline bool has_avx512bf16 () {
302303 static bool v = [] {
303304 int info[4 ];
@@ -306,18 +307,21 @@ static inline bool has_avx512bf16() {
306307 }();
307308 return v;
308309}
310+ #endif
309311#else
310312static inline bool has_avx512f () {
311313 static const bool supported_avx512f = __builtin_cpu_supports (" avx512f" );
312314 return supported_avx512f;
313315}
314316
317+ #if defined(__AVX512BF16__)
315318static inline bool has_avx512bf16 () {
316319 static const bool supported_avx512bf16 = __builtin_cpu_supports (" avx512bf16" );
317320 return supported_avx512bf16;
318321}
319322#endif
320323#endif
324+ #endif
321325
322326#if defined(__AVX512F__) && defined(__AVX512BF16__)
323327template <typename T, int DATA_TYPE>
Original file line number Diff line number Diff line change @@ -909,7 +909,8 @@ void gemv_4bit_inference_cpu_nf4_bf16(
909909#endif
910910#if defined(__AVX512F__)
911911bool has_avx512f_cpu () { return has_avx512f (); }
912-
912+ # if defined(__AVX512BF16__)
913913bool has_avx512bf16_cpu () { return has_avx512bf16 (); }
914914#endif
915+ #endif
915916}
You can’t perform that action at this time.
0 commit comments