Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/intgemm/intgemm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Heafield <github@kheafield.com>2020-03-03 18:15:18 +0300
committerKenneth Heafield <github@kheafield.com>2020-03-03 18:15:18 +0300
commit65393a40af704dca15ea5d283fb32dbee2580ef6 (patch)
tree1fe57aec202258b946a1894e1994ea070ac540c1
parent0654d2785d70d31c65b072814acf7bd9a4cc5164 (diff)
Fix compiler warning for compilers without VNNI
-rw-r--r--intgemm.h10
1 files 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 <class T> T ChooseCPU(T avx512vnni, T avx512bw, T avx2, T ssse3, T sse2, T unsupported) {
+template <class T> 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 (