Skip to content

Commit 3899385

Browse files
author
Raghuveer Devulapalli
committed
Fix build failure for __builtin_cpu_supports(avx512fp16)
1 parent 583ddf9 commit 3899385

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/x86simdsort.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@
88
static int check_cpu_feature_support(std::string_view cpufeature)
99
{
1010
if (cpufeature == "avx512_spr")
11+
#ifdef __FLT16_MAX__
1112
return __builtin_cpu_supports("avx512f")
1213
&& __builtin_cpu_supports("avx512fp16")
1314
&& __builtin_cpu_supports("avx512vbmi2");
15+
#else
16+
return 0;
17+
#endif
1418
else if (cpufeature == "avx512_icl")
1519
return __builtin_cpu_supports("avx512f")
1620
&& __builtin_cpu_supports("avx512vbmi2")

0 commit comments

Comments
 (0)