Skip to content

Commit

Permalink
Enable SVE2 support in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jfalcou authored Feb 14, 2025
1 parent babb820 commit 03f4c77
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ jobs:
fail-fast: false
matrix:
cfg:
- { comp: gcc, arch: sve256, opts: -Wno-psabi}
- { comp: gcc, arch: sve512, opts: -Wno-psabi}
- { comp: gcc, arch: sve , opts: -Wno-psabi}
- { comp: gcc, arch: sve2 , opts: -Wno-psabi}
- { comp: gcc, arch: ppc64 , opts: -Wno-psabi}
steps:
- name: Fetch current branch
Expand Down
15 changes: 15 additions & 0 deletions cmake/toolchain/gcc.sve.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
##==================================================================================================
## EVE - Expressive Vector Engine
## Copyright : EVE Project Contributors
## SPDX-License-Identifier: BSL-1.0
##==================================================================================================
set(CMAKE_SYSTEM_NAME Linux )
set(CMAKE_SYSTEM_PROCESSOR arm )


set(EVE_USE_PCH OFF) # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106491
set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc-12 )
set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++-12 )
set(CMAKE_CXX_FLAGS "-Wno-psabi -DEVE_NO_FORCEINLINE ${EVE_OPTIONS} -march=armv8-a+sve -msve-vector-bits=512" )

set(CMAKE_CROSSCOMPILING_CMD qemu-aarch64)
14 changes: 14 additions & 0 deletions cmake/toolchain/gcc.sve2.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
##==================================================================================================
## EVE - Expressive Vector Engine
## Copyright : EVE Project Contributors
## SPDX-License-Identifier: BSL-1.0
##==================================================================================================
set(CMAKE_SYSTEM_NAME Linux )
set(CMAKE_SYSTEM_PROCESSOR arm )

set(EVE_USE_PCH OFF) # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106491
set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc-12 )
set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++-12 )
set(CMAKE_CXX_FLAGS "-Wno-psabi -DEVE_NO_FORCEINLINE ${EVE_OPTIONS} -march=armv8-a+sve2 -msve-vector-bits=128" )

set(CMAKE_CROSSCOMPILING_CMD ${PROJECT_SOURCE_DIR}/cmake/toolchain/run_sve128.sh )
2 changes: 1 addition & 1 deletion include/eve/arch/abi_of.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace eve
if constexpr(!f64 && width <= 16) return ppc_{};
else return emulated_{};
}
else if constexpr( spy::simd_instruction_set == spy::fixed_sve_ )
else if constexpr( (spy::simd_instruction_set == spy::fixed_sve_) || (spy::simd_instruction_set == spy::fixed_sve2_) )
{
if constexpr(spy::simd_instruction_set.width == 128) return arm_sve_128_{};
else if constexpr(spy::simd_instruction_set.width == 256) return arm_sve_256_{};
Expand Down
8 changes: 4 additions & 4 deletions include/eve/arch/arm/sve/tags.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ namespace eve
struct sve256_ : simd_api<sve_vls_, spy::fixed_sve_> { using is_sve = void; };
struct sve512_ : simd_api<sve_vls_, spy::fixed_sve_> { using is_sve = void; };

struct sve2_ : simd_api<sve_ , spy::sve2_> { using is_sve = void; };
struct sve2_128_ : simd_api<sve128_, spy::fixed_sve2_> { using is_sve = void; };
struct sve2_256_ : simd_api<sve256_, spy::fixed_sve2_> { using is_sve = void; };
struct sve2_512_ : simd_api<sve512_, spy::fixed_sve2_> { using is_sve = void; };
struct sve2_ : simd_api<sve_ , spy::sve2_> { using is_sve = void; };
struct sve2_128_ : simd_api<sve2_, spy::fixed_sve2_> { using is_sve = void; };
struct sve2_256_ : simd_api<sve2_, spy::fixed_sve2_> { using is_sve = void; };
struct sve2_512_ : simd_api<sve2_, spy::fixed_sve2_> { using is_sve = void; };

//================================================================================================
// SVE extensions tag objects
Expand Down

0 comments on commit 03f4c77

Please sign in to comment.