diff --git a/hwy/base.h b/hwy/base.h index a02fe7096f..4dff1f805f 100644 --- a/hwy/base.h +++ b/hwy/base.h @@ -22,8 +22,8 @@ #include #include #if defined(HWY_HEADER_ONLY) -#include -#include +#include +#include #endif #if !defined(HWY_NO_LIBCXX) @@ -1744,9 +1744,9 @@ HWY_F16_CONSTEXPR inline std::partial_ordering operator<=>( // bf16 <-> f32 in convert_test results in 0x2525 for 1.0 instead of 0x3f80. // Reported at https://github.com/llvm/llvm-project/issues/151692. #ifndef HWY_SSE2_HAVE_SCALAR_BF16_TYPE -#if HWY_ARCH_X86 && defined(__SSE2__) && \ - ((HWY_COMPILER_CLANG >= 1700 && !HWY_COMPILER_CLANGCL && \ - !HWY_IS_DEBUG_BUILD) || \ +#if HWY_ARCH_X86 && defined(__SSE2__) && \ + ((HWY_COMPILER_CLANG >= 1700 && !HWY_COMPILER_CLANGCL && \ + (!HWY_IS_DEBUG_BUILD || HWY_COMPILER3_CLANG >= 220101)) || \ HWY_COMPILER_GCC_ACTUAL >= 1300) #define HWY_SSE2_HAVE_SCALAR_BF16_TYPE 1 #else diff --git a/hwy/contrib/thread_pool/thread_pool.h b/hwy/contrib/thread_pool/thread_pool.h index 7f647820b8..1f19ab4a8f 100644 --- a/hwy/contrib/thread_pool/thread_pool.h +++ b/hwy/contrib/thread_pool/thread_pool.h @@ -1605,7 +1605,7 @@ class alignas(HWY_ALIGNMENT) ThreadPool { // Returns whether threads were used. If not, there is no need to update // the autotuner config. template - bool RunWithoutAutotune(uint64_t begin, uint64_t end, pool::Caller caller, + bool RunWithoutAutotune(uint64_t begin, uint64_t end, HWY_MAYBE_UNUSED pool::Caller caller, const Closure& closure) { pool::Worker& main = workers_[0]; diff --git a/hwy/ops/set_macros-inl.h b/hwy/ops/set_macros-inl.h index 1dfb197ab9..2a5e1dc1ca 100644 --- a/hwy/ops/set_macros-inl.h +++ b/hwy/ops/set_macros-inl.h @@ -187,12 +187,13 @@ #define HWY_TARGET_STR_AVX3_SPR HWY_TARGET_STR_AVX3_ZEN4 #endif -#if HWY_COMPILER_GCC_ACTUAL >= 1500 || HWY_COMPILER_CLANG >= 2200 -#if HWY_HAVE_EVEX512 +// Support for avx10.2-512 was removed between clang 22 and 23 without a +// feature test macro. +#if HWY_COMPILER_CLANG >= 2200 && HWY_HAVE_EVEX512 #define HWY_TARGET_STR_AVX10_2 HWY_TARGET_STR_AVX3_SPR ",avx10.2-512" -#else +// Recent compilers drop the -512 suffix because 512 bits are always available. +#elif HWY_COMPILER_GCC_ACTUAL >= 1500 || HWY_COMPILER_CLANG >= 2200 #define HWY_TARGET_STR_AVX10_2 HWY_TARGET_STR_AVX3_SPR ",avx10.2" -#endif // HWY_HAVE_EVEX512 #else #define HWY_TARGET_STR_AVX10_2 HWY_TARGET_STR_AVX3_SPR #endif