Skip to content

Commit

Permalink
Add SYCL CI with AMD BE.
Browse files Browse the repository at this point in the history
Didn't add a test with an NVIDIA backend, as the oneAPI+CUDA combination
used by the CI crashes on the current code of the project. (The latest
versions of both do succeed however. So there's no point in debugging
this further.)

Updated all CI tests to use v67 of the Docker images.
  • Loading branch information
krasznaa committed Nov 22, 2024
1 parent c21bb72 commit b6edf0a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 16 deletions.
9 changes: 1 addition & 8 deletions .github/ci_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,8 @@
PLATFORM_NAME=$1

# Set up the correct environment for the SYCL tests.
if [ "${PLATFORM_NAME}" = "SYCL" ]; then
if [[ "${PLATFORM_NAME}" == *"SYCL"* ]]; then
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 ONEAPI_DEVICE_SELECTOR=opencl:cpu
export SYCLFLAGS="-fsycl -fsycl-targets=spir64"
fi
32 changes: 24 additions & 8 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,37 +69,50 @@ jobs:
BUILD_TYPE: ["Release", "Debug"]
PLATFORM:
- NAME: "HOST"
CONTAINER: "ghcr.io/acts-project/ubuntu2404:56"
CONTAINER: "ghcr.io/acts-project/ubuntu2404:67"
OPTIONS: --preset eigen -DALGEBRA_PLUGINS_USE_SYSTEM_EIGEN3=TRUE
RUN_TESTS: true
ENVIRONMENT:
- NAME: "HOST"
CONTAINER: "ghcr.io/acts-project/ubuntu2404:56"
CONTAINER: "ghcr.io/acts-project/ubuntu2404:67"
OPTIONS: --preset eigen
RUN_TESTS: true
ENVIRONMENT:
- NAME: "HOST"
CONTAINER: "ghcr.io/acts-project/ubuntu2404:56"
CONTAINER: "ghcr.io/acts-project/ubuntu2404:67"
OPTIONS: -DALGEBRA_PLUGINS_INCLUDE_SMATRIX=TRUE
RUN_TESTS: true
ENVIRONMENT:
- NAME: "HOST"
CONTAINER: "ghcr.io/acts-project/ubuntu2404:56"
CONTAINER: "ghcr.io/acts-project/ubuntu2404:67"
OPTIONS: --preset vc
RUN_TESTS: true
ENVIRONMENT:
- NAME: "HOST"
CONTAINER: "ghcr.io/acts-project/ubuntu2404:56"
CONTAINER: "ghcr.io/acts-project/ubuntu2404:67"
OPTIONS: --preset vecmem
RUN_TESTS: true
ENVIRONMENT:
- NAME: "HOST"
CONTAINER: "ghcr.io/acts-project/ubuntu2404:56"
CONTAINER: "ghcr.io/acts-project/ubuntu2404:67"
OPTIONS: --preset fastor
RUN_TESTS: true
ENVIRONMENT:
- NAME: "CUDA"
CONTAINER: "ghcr.io/acts-project/ubuntu2404_cuda:67"
OPTIONS: --preset cuda
RUN_TESTS: false
- NAME: "SYCL HOST"
CONTAINER: "ghcr.io/acts-project/ubuntu2404_oneapi:56"
ENVIRONMENT:
- NAME: "SYCL Intel"
CONTAINER: "ghcr.io/acts-project/ubuntu2404_oneapi:67"
OPTIONS: --preset sycl
RUN_TESTS: false
ENVIRONMENT: export SYCLFLAGS="-fsycl"
- NAME: "SYCL AMD"
CONTAINER: "ghcr.io/acts-project/ubuntu2404_rocm_oneapi:67"
OPTIONS: --preset sycl
RUN_TESTS: false
ENVIRONMENT:

# The system to run on.
runs-on: ubuntu-latest
Expand All @@ -118,16 +131,19 @@ jobs:
- name: Configure
run: |
source ${GITHUB_WORKSPACE}/.github/ci_setup.sh ${{ matrix.PLATFORM.NAME }}
${{ matrix.PLATFORM.ENVIRONMENT }}
cmake ${{ matrix.PLATFORM.OPTIONS }} -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} -S ${GITHUB_WORKSPACE} -B build
# Perform the build.
- name: Build
run: |
source ${GITHUB_WORKSPACE}/.github/ci_setup.sh ${{ matrix.PLATFORM.NAME }}
${{ matrix.PLATFORM.ENVIRONMENT }}
cmake --build build
# Run the unit test(s).
- name: Test
if: "matrix.PLATFORM.RUN_TESTS"
run: |
cd build
source ${GITHUB_WORKSPACE}/.github/ci_setup.sh ${{ matrix.PLATFORM.NAME }}
${{ matrix.PLATFORM.ENVIRONMENT }}
ctest --output-on-failure

0 comments on commit b6edf0a

Please sign in to comment.