Skip to content

Commit

Permalink
Update github actions and switch to newer containers
Browse files Browse the repository at this point in the history
  • Loading branch information
niermann999 committed Nov 12, 2024
1 parent 4bfcc95 commit 19453e2
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 37 deletions.
7 changes: 5 additions & 2 deletions .github/ci_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ PLATFORM_NAME=$1

# Set up the correct environment for the SYCL tests.
if [ "${PLATFORM_NAME}" = "SYCL" ]; then
source /opt/intel/oneapi/setvars.sh --include-intel-llvm
if [ -f "/opt/intel/oneapi/setvars.sh" ]; then
source /opt/intel/oneapi/setvars.sh --include-intel-llvm
fi
# Use clang/clang++ instead of icx/icpx, to avoid some aggressive math
# optimizations that break some tests.
export CC=`which clang`
export CXX=`which clang++`
export SYCLCXX="${CXX} -fsycl"
export SYCL_DEVICE_FILTER=host
export ONEAPI_DEVICE_SELECTOR=opencl:cpu
export SYCLFLAGS="-fsycl"
fi
32 changes: 20 additions & 12 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Algebra plugins library, part of the ACTS project (R&D line)
#
# (c) 2021-2023 CERN for the benefit of the ACTS project
# (c) 2021-2024 CERN for the benefit of the ACTS project
#
# Mozilla Public License Version 2.0

Expand Down Expand Up @@ -37,7 +37,7 @@ jobs:
# The build/test steps to execute.
steps:
# Use a standard checkout of the code.
- uses: actions/checkout@v2
- uses: actions/checkout@v4
# Run the CMake configuration.
- name: Configure
run: cmake --preset default-x86-64
Expand All @@ -62,28 +62,36 @@ jobs:
BUILD_TYPE: ["Release", "Debug"]
PLATFORM:
- NAME: "HOST"
CONTAINER: "ghcr.io/acts-project/ubuntu2004:v43"
CXX_STANDARD: "20"
CONTAINER: "ghcr.io/acts-project/ubuntu2404:56"
OPTIONS: --preset eigen -DALGEBRA_PLUGINS_USE_SYSTEM_EIGEN3=TRUE
- NAME: "HOST"
CONTAINER: "ghcr.io/acts-project/ubuntu2004:v43"
CXX_STANDARD: "20"
CONTAINER: "ghcr.io/acts-project/ubuntu2404:56"
OPTIONS: --preset eigen
- NAME: "HOST"
CONTAINER: "ghcr.io/acts-project/ubuntu2004:v43"
CXX_STANDARD: "20"
CONTAINER: "ghcr.io/acts-project/ubuntu2404:56"
OPTIONS: -DALGEBRA_PLUGINS_INCLUDE_SMATRIX=TRUE
- NAME: "HOST"
CONTAINER: "ghcr.io/acts-project/ubuntu2004:v43"
CXX_STANDARD: "20"
CONTAINER: "ghcr.io/acts-project/ubuntu2404:56"
OPTIONS: --preset vc
- NAME: "HOST"
CONTAINER: "ghcr.io/acts-project/ubuntu2004:v43"
CXX_STANDARD: "20"
CONTAINER: "ghcr.io/acts-project/ubuntu2404:56"
OPTIONS: --preset vecmem
- NAME: "HOST"
CONTAINER: "ghcr.io/acts-project/ubuntu2004:v43"
CXX_STANDARD: "20"
CONTAINER: "ghcr.io/acts-project/ubuntu2404:56"
OPTIONS: --preset fastor
- NAME: "CUDA"
CONTAINER: "ghcr.io/acts-project/ubuntu2004_cuda:v43"
CXX_STANDARD: "20"
CONTAINER: "ghcr.io/acts-project/ubuntu2404_cuda:67"
OPTIONS: --preset cuda
- NAME: "SYCL"
CONTAINER: "ghcr.io/acts-project/ubuntu2004_oneapi:v43"
CXX_STANDARD: "20"
CONTAINER: "ghcr.io/acts-project/ubuntu2404_oneapi:56"
OPTIONS: --preset sycl

# The system to run on.
Expand All @@ -98,12 +106,12 @@ jobs:
# The build/test steps to execute.
steps:
# Use a standard checkout of the code.
- uses: actions/checkout@v2
- uses: actions/checkout@v4
# Run the CMake configuration.
- name: Configure
run: |
source ${GITHUB_WORKSPACE}/.github/ci_setup.sh ${{ matrix.PLATFORM.NAME }}
cmake ${{ matrix.PLATFORM.OPTIONS }} -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} -S ${GITHUB_WORKSPACE} -B build
cmake ${{ matrix.PLATFORM.OPTIONS }} -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} -DCMAKE_CXX_STANDARD=${{ matrix.PLATFORM.CXX_STANDARD }} -DCMAKE_CUDA_STANDARD=${{ matrix.PLATFORM.CXX_STANDARD }} -DCMAKE_SYCL_STANDARD=${{ matrix.PLATFORM.CXX_STANDARD }} -S ${GITHUB_WORKSPACE} -B build
# Perform the build.
- name: Build
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Algebra plugins library, part of the ACTS project (R&D line)
#
# (c) 2021-2022 CERN for the benefit of the ACTS project
# (c) 2021-2024 CERN for the benefit of the ACTS project
#
# Mozilla Public License Version 2.0

Expand All @@ -18,10 +18,10 @@ jobs:
runs-on: ubuntu-latest
container: ghcr.io/acts-project/format10:v11
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Check
run: .github/check_format.sh .
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
if: failure()
with:
name: changed
Expand Down
12 changes: 8 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Algebra plugins library, part of the ACTS project (R&D line)
#
# (c) 2021-2023 CERN for the benefit of the ACTS project
# (c) 2021-2024 CERN for the benefit of the ACTS project
#
# Mozilla Public License Version 2.0

Expand All @@ -9,11 +9,15 @@ cmake_minimum_required( VERSION 3.14 )
project( algebra-plugins VERSION 0.23 LANGUAGES CXX )

# Set up the used C++ standard.
set( CMAKE_CXX_STANDARD 17 CACHE STRING "The (host) C++ standard to use" )
set( CMAKE_CXX_STANDARD 20 CACHE STRING "The (host) C++ standard to use" )
set( CMAKE_CXX_EXTENSIONS FALSE CACHE BOOL "Disable (host) C++ extensions" )
set( CMAKE_CUDA_STANDARD 17 CACHE STRING "The (CUDA) C++ standard to use" )
set( CMAKE_CUDA_STANDARD 20 CACHE STRING "The (CUDA) C++ standard to use" )
set( CMAKE_CUDA_EXTENSIONS FALSE CACHE BOOL "Disable (CUDA) C++ extensions" )
set( CMAKE_SYCL_STANDARD 17 CACHE STRING "The (SYCL) C++ standard to use" )
set( CMAKE_SYCL_STANDARD 20 CACHE STRING "The (SYCL) C++ standard to use" )

if(${CMAKE_CXX_STANDARD} LESS 20)
message(SEND_ERROR "CMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}, but algebra-plugins requires C++>=20")
endif()

# Standard CMake include(s).
include( CTest )
Expand Down
30 changes: 14 additions & 16 deletions frontend/vc_aos/include/algebra/vc_aos.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,15 @@ using cmath::element;

/// Function extracting a slice from matrix44 - const
template <std::size_t SIZE, template <typename, std::size_t> class array_t,
typename value_t, std::size_t N,
std::enable_if_t<SIZE <= 4, bool> = true>
ALGEBRA_HOST_DEVICE inline const auto& vector(
const storage::matrix44<array_t, value_t, N>& m,
std::size_t
typename value_t, std::size_t N>
requires(SIZE <= 4) ALGEBRA_HOST_DEVICE inline const
auto& vector(const storage::matrix44<array_t, value_t, N>& m,
std::size_t
#ifndef NDEBUG
row
row
#endif // not NDEBUG
,
std::size_t col) {
,
std::size_t col) {

assert(row == 0);
assert(col < 4);
Expand All @@ -82,16 +81,15 @@ ALGEBRA_HOST_DEVICE inline const auto& vector(

/// Function extracting a slice from matrix44 - non-const
template <std::size_t SIZE, template <typename, std::size_t> class array_t,
typename value_t, std::size_t N,
std::enable_if_t<SIZE <= 4, bool> = true>
ALGEBRA_HOST_DEVICE inline auto& vector(
storage::matrix44<array_t, value_t, N>& m,
std::size_t
typename value_t, std::size_t N>
requires(SIZE <= 4) ALGEBRA_HOST_DEVICE
inline auto& vector(storage::matrix44<array_t, value_t, N>& m,
std::size_t
#ifndef NDEBUG
row
row
#endif // not NDEBUG
,
std::size_t col) {
,
std::size_t col) {

assert(row == 0);
assert(col < 4);
Expand Down

0 comments on commit 19453e2

Please sign in to comment.