Skip to content

Commit

Permalink
Add workflow for oneAPI SYCL on Nvidia GPUs
Browse files Browse the repository at this point in the history
  • Loading branch information
nmnobre authored and WeiqunZhang committed Jun 8, 2023
1 parent 7c7a8fb commit f254425
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/dependencies/dependencies_codeplay.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
#
# Copyright 2020 The AMReX Community
#
# License: BSD-3-Clause-LBNL

set -eu -o pipefail

curl -o oneapi_nvidia.sh -LJO "https://developer.codeplay.com/api/v1/products/download?product=oneapi&variant=nvidia&filters[]=linux&aat=$1"
chmod +x oneapi_nvidia.sh
sudo ./oneapi_nvidia.sh --yes
63 changes: 63 additions & 0 deletions .github/workflows/intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,69 @@ jobs:
ccache -s
du -hs ~/.cache/ccache
tests-oneapi-sycl-eb-nvidia:
name: oneAPI SYCL for Nvidia GPUs [tests w/ EB]
runs-on: ubuntu-latest
env:
CODEPLAYTOKEN: ${{ secrets.CODEPLAYTOKEN }}
steps:
- name: github context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo '$GITHUB_CONTEXT'
- name: github job context
env:
JOB_CONTEXT: ${{ toJson(github) }}
run: echo '$JOB_CONTEXT'
- name: echo
run: |
echo "CODEPLAYTOKEN: $CODEPLAYTOKEN"
env | sort
- name: Exit if no codeplay token
if: ${{ env.CODEPLAYTOKEN == '' }
run: exit 0
- uses: actions/checkout@v3
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies_nvcc12.sh
.github/workflows/dependencies/dependencies_dpcpp.sh
.github/workflows/dependencies/dependencies_codeplay.sh ${{ env.CODEPLAYTOKEN }}
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v3
with:
path: ~/.cache/ccache
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
restore-keys: |
ccache-${{ github.workflow }}-${{ github.job }}-git-
- name: Build & Install
# mkl/rng/device/detail/mrg32k3a_impl.hpp has a number of sign-compare error
# mkl/rng/device/detail/mrg32k3a_impl.hpp has missing braces in array-array initalization
# clang currently supports CUDA up to version 11.5 and a warning is issued with newer versions
env: {CXXFLAGS: "-fsycl -fsycl-targets=nvptx64-nvidia-cuda -fno-operator-names -Werror -Wall -Wextra -Wpedantic -Wnull-dereference -Wfloat-conversion -Wshadow -Woverloaded-virtual -Wextra-semi -Wunreachable-code -Wnon-virtual-dtor -Wno-sign-compare -Wno-missing-braces -Wno-unknown-cuda-version"}
run: |
export CCACHE_COMPRESS=1
export CCACHE_COMPRESSLEVEL=10
export CCACHE_MAXSIZE=55M
export CCACHE_DEPEND=1
ccache -z
set +e
source /opt/intel/oneapi/setvars.sh --include-intel-llvm
set -e
cmake -S . -B build \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DAMReX_EB=ON \
-DAMReX_ENABLE_TESTS=OFF \
-DAMReX_GPU_BACKEND=SYCL \
-DCMAKE_C_COMPILER=$(which icx) \
-DCMAKE_CXX_COMPILER=$(which clang++) \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
cmake --build build --parallel 2
ccache -s
du -hs ~/.cache/ccache
# "Classic" EDG Intel Compiler
# Ref.: https://github.com/rscohn2/oneapi-ci
# intel-basekit intel-hpckit are too large in size
Expand Down

0 comments on commit f254425

Please sign in to comment.