From 65393a40af704dca15ea5d283fb32dbee2580ef6 Mon Sep 17 00:00:00 2001 From: Kenneth Heafield Date: Tue, 3 Mar 2020 15:15:18 +0000 Subject: Fix compiler warning for compilers without VNNI --- intgemm.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/intgemm.h b/intgemm.h index baba935..ba86e53 100644 --- a/intgemm.h +++ b/intgemm.h @@ -161,14 +161,18 @@ inline bool CheckAVX512BW() { * avx512bw if the CPU supports AVX512BW * * avx2 if the CPU supports AVX2 - * + * * ssse3 if the CPU supports SSSE3 (this distinction from SSE2 matters for 8-bit) - * + * * sse2 if the CPU supports SSE2 * * unsupported otherwise */ -template T ChooseCPU(T avx512vnni, T avx512bw, T avx2, T ssse3, T sse2, T unsupported) { +template T ChooseCPU(T +#ifdef INTGEMM_COMPILER_SUPPORTS_AVX512VNNI + avx512vnni +#endif + , T avx512bw, T avx2, T ssse3, T sse2, T unsupported) { __builtin_cpu_init (); #ifdef INTGEMM_COMPILER_SUPPORTS_AVX512VNNI if ( -- cgit v1.2.3