From b008a9e9954b83fd371c572c321b26597211a9c1 Mon Sep 17 00:00:00 2001 From: zy69guqi <richard.angersbach@fau.de> Date: Fri, 28 Mar 2025 13:26:09 +0100 Subject: [PATCH] Adapt guards for generated avx512 horizontal ops --- src/pystencils/include/simd_horizontal_helpers.h | 2 +- util/generate_simd_horizontal_op.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pystencils/include/simd_horizontal_helpers.h b/src/pystencils/include/simd_horizontal_helpers.h index cd4bd5730..bd1889153 100644 --- a/src/pystencils/include/simd_horizontal_helpers.h +++ b/src/pystencils/include/simd_horizontal_helpers.h @@ -120,7 +120,7 @@ inline float _mm256_horizontal_max_ps(float dst, __m256 src) { #endif -#if defined(__AVX512VL__) +#if defined(__AVX512F__) #include <immintrin.h> inline double _mm512_horizontal_add_pd(double dst, __m512d src) { diff --git a/util/generate_simd_horizontal_op.py b/util/generate_simd_horizontal_op.py index aebbf35bb..1d652c6e1 100644 --- a/util/generate_simd_horizontal_op.py +++ b/util/generate_simd_horizontal_op.py @@ -277,7 +277,7 @@ vtypes_for_instruction_set = { guards_for_instruction_sets = { InstructionSets.SSE3: "__SSE3__", InstructionSets.AVX: "__AVX__", - InstructionSets.AVX512: '__AVX512VL__', + InstructionSets.AVX512: '__AVX512F__', InstructionSets.NEON: '_M_ARM64', } -- GitLab