Skip to content

Commit

Permalink
Fix build failure for __builtin_cpu_supports(avx512fp16)
Browse files Browse the repository at this point in the history
  • Loading branch information
r-devulap committed Sep 14, 2023
1 parent e96aca0 commit 049cc66
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/x86simdsort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@
static int check_cpu_feature_support(std::string_view cpufeature)
{
if (cpufeature == "avx512_spr")
#ifdef __FLT16_MAX__
return __builtin_cpu_supports("avx512f")
&& __builtin_cpu_supports("avx512fp16")
&& __builtin_cpu_supports("avx512vbmi2");
#else
return 0;
#endif
else if (cpufeature == "avx512_icl")
return __builtin_cpu_supports("avx512f")
&& __builtin_cpu_supports("avx512vbmi2")
Expand Down

0 comments on commit 049cc66

Please sign in to comment.