From fbed02690d8a3ab1889f769afe19954fb99698e1 Mon Sep 17 00:00:00 2001 From: nmeyer-ur Date: Fri, 8 May 2020 12:05:31 +0200 Subject: [PATCH] some changes in breaking out A64FX: use -DA64FXFIXEDSIZE for fixed size, but also define GEN --- Grid/simd/Grid_a64fx-fixedsize.h | 4 +++- Grid/simd/Grid_vector_types.h | 20 ++++++++++++-------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/Grid/simd/Grid_a64fx-fixedsize.h b/Grid/simd/Grid_a64fx-fixedsize.h index 34ba955c..901c85b8 100644 --- a/Grid/simd/Grid_a64fx-fixedsize.h +++ b/Grid/simd/Grid_a64fx-fixedsize.h @@ -36,6 +36,7 @@ //static_assert(GEN_SIMD_WIDTH % 64u == 0, "A64FX SIMD vector size is 64 bytes"); +/* #ifdef __ARM_FEATURE_SVE #pragma message("Yes, we have SVE feature") #include @@ -43,6 +44,7 @@ #pragma error "Missing SVE feature" #endif /* __ARM_FEATURE_SVE */ + // gcc 10 features #if __ARM_FEATURE_SVE_BITS==512 #pragma message("Fixed-size SVE ACLE") @@ -58,7 +60,7 @@ typedef svuint64_t lutd __attribute__((arm_sve_vector_bits(512))); // LUTs for #endif /* __ARM_FEATURE_SVE_BITS */ // safety definition, not sure if it's necessary -#define GEN_SIMD_WIDTH 64u +//#define GEN_SIMD_WIDTH 64u // low-level API NAMESPACE_BEGIN(Grid); diff --git a/Grid/simd/Grid_vector_types.h b/Grid/simd/Grid_vector_types.h index 55d521b3..f8223441 100644 --- a/Grid/simd/Grid_vector_types.h +++ b/Grid/simd/Grid_vector_types.h @@ -119,25 +119,29 @@ accelerator_inline Grid_half sfw_float_to_half(float ff) { #ifdef A64FXGCC #include "Grid_a64fx-fixedsize.h" #else - #ifdef GEN - #if defined(A64FX) // breakout A64FX SVE ACLE here + +#ifdef GEN + #if defined(A64FX) || defined(A64FXGCC) // breakout A64FX SVE ACLE here + #include + if defined(A64FX) // VLA #pragma message("building for A64FX / SVE ACLE VLA") #if defined(ARMCLANGCOMPAT) #pragma message("applying armclang fix") //#else - // #pragma message("not applying armclang fix") + //#pragma message("not applying armclang fix") #endif - #include #include "Grid_a64fx-2.h" - #else - #pragma message("building for A64FX / GEN") - #include "Grid_generic.h" + #endif + #if defined(A64FXFIXEDSIZE) // fixed size data types + #include "Grid_a64fx-fixedsize.h" #endif #else - #pragma error("Undefined architecture") + #pragma message("building for GEN") // generic + #include "Grid_generic.h" #endif #endif + #ifdef SSE4 #include "Grid_sse4.h" #endif