Skip to content

Commit

Permalink
Merge branch 'add_monopole_work_aggregation' of github.com:STEllAR-GR…
Browse files Browse the repository at this point in the history
…OUP/octotiger into add_monopole_work_aggregation
  • Loading branch information
G-071 committed Feb 20, 2024
2 parents 6386974 + 7d703b0 commit 04f46ab
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
14 changes: 10 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ set(OCTOTIGER_CUDA_ARCH "sm_50"

set(OCTOTIGER_KOKKOS_SIMD_LIBRARY "KOKKOS" CACHE STRING "Choose either KOKKOS (for kokkos simd types) or STD (for std::experimental::simd.")
set(OCTOTIGER_KOKKOS_SIMD_EXTENSION "DISCOVER" CACHE STRING "Choose either AVX512 AVX2 VSX NEON SVE SCALAR or DISCOVER (automatic discovery)")
set(OCTOTIGER_SVE_LEN "512" CACHE STRING "Choose number of bits for SVE (must be 128, 256 or 512)")

# silence warnings for deprecated HPX includes
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-cpp")
Expand Down Expand Up @@ -166,6 +167,7 @@ FetchContent_Declare(
GIT_TAG c845b7d9d8da461457cc5aa88fdda5923773a4bf
)
FetchContent_MakeAvailable(kokkossimd)
set(SVE_LENGTH ${OCTOTIGER_SVE_LEN})
FetchContent_Declare(
svesimd
GIT_REPOSITORY https://github.com/srinivasyadav18/sve.git
Expand Down Expand Up @@ -825,10 +827,14 @@ elseif(${OCTOTIGER_KOKKOS_SIMD_EXTENSION} STREQUAL SVE)
if(OCTOTIGER_WITH_CXX17)
message(FATAL_ERROR "SVE builds with std::experimental::simd require C++20. Please set OCTOTIGER_WITH_CXX20=ON")
endif()
target_compile_definitions(octotiger PUBLIC SVE_LEN=512)
target_compile_definitions(optionslib PUBLIC SVE_LEN=512)
target_compile_definitions(octolib PUBLIC SVE_LEN=512)
target_compile_definitions(hydrolib PUBLIC SVE_LEN=512)
target_compile_definitions(octotiger PUBLIC SVE_LEN=${OCTOTIGER_SVE_LEN})
target_compile_definitions(optionslib PUBLIC SVE_LEN=${OCTOTIGER_SVE_LEN})
target_compile_definitions(octolib PUBLIC SVE_LEN=${OCTOTIGER_SVE_LEN})
target_compile_definitions(hydrolib PUBLIC SVE_LEN=${OCTOTIGER_SVE_LEN})
target_compile_options(hydrolib PUBLIC "-msve-vector-bits=${OCTOTIGER_SVE_LEN}")
target_compile_options(octolib PUBLIC "-msve-vector-bits=${OCTOTIGER_SVE_LEN}")
target_compile_options(optionslib PUBLIC "-msve-vector-bits=${OCTOTIGER_SVE_LEN}")
target_compile_options(octotiger PUBLIC "-msve-vector-bits=${OCTOTIGER_SVE_LEN}")
endif()
elseif(${OCTOTIGER_KOKKOS_SIMD_EXTENSION} STREQUAL SCALAR)
message(STATUS "KOKKOS SIMD extension manually set to SCALAR (SIMD is OFF)")
Expand Down
5 changes: 3 additions & 2 deletions octotiger/common_kernel/std_simd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ static_assert(host_simd_mask_t::size() == 2);
namespace SIMD_NAMESPACE = sve::experimental::parallelism_v2;
using host_simd_t = sve::experimental::native_simd<double>;
using host_simd_mask_t = sve::experimental::native_simd_mask<double>;
static_assert(host_simd_t::size() == 8);
static_assert(host_simd_mask_t::size() == 8);
static_assert(host_simd_t::size() == 8 || host_simd_t::size() == 4 || host_simd_t::size() == 2);
static_assert(host_simd_mask_t::size() == 8 || host_simd_mask_t::size() == 4 ||
host_simd_mask_t::size() == 2);
#elif defined(OCTOTIGER_KOKKOS_SIMD_VSX)
#if !(defined(__VSX__)
#error "VSX Kokkos kernels are specified explicitly but build is without VSX support."
Expand Down

0 comments on commit 04f46ab

Please sign in to comment.