Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/compile_workspace.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:

opensycl-linux:
uses: ./.github/workflows/linux-opensycl.yml
with:
clang: ${{ matrix.clang }}
os: ${{ matrix.os }}
cuda: ${{ matrix.cuda }}
rocm: ${{ matrix.rocm }}
strategy:
matrix:
clang: [15]
os: [ubuntu-22.04]
cuda: [11.0.2]
rocm: [5.4.3]

opensycl-macos:
uses: ./.github/workflows/macos-opensycl.yml
with:
os: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest]

86 changes: 86 additions & 0 deletions .github/workflows/linux-opensycl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: OpenSYCL linux pipeline

on:
workflow_call:
inputs:
clang:
required: true
type: string
os:
required: true
type: string
cuda:
required: true
type: string
rocm:
required: true
type: string



jobs:

cache_opensycl:
name: cache opensycl
runs-on: ${{ inputs.os }}

steps:

- uses: actions/checkout@v3

- name: clone OpenSycl
run: git submodule update --init sycl_compiler_gits/opensycl

- name: install boost
run: sudo apt install libboost-all-dev

# cp from opensycl ci
- name: install Level Zero
run : |
wget https://github.com/oneapi-src/level-zero/releases/download/v1.2.3/level-zero-devel_1.2.3+u18.04_amd64.deb
wget https://github.com/oneapi-src/level-zero/releases/download/v1.2.3/level-zero_1.2.3+u18.04_amd64.deb
sudo dpkg -i ./level-zero*

- name: install CUDA
run: |
mkdir -p /opt/OpenSYCL/cuda
wget -q -O cuda.sh http://developer.download.nvidia.com/compute/cuda/11.0.2/local_installers/cuda_11.0.2_450.51.05_linux.run
sudo sh ./cuda.sh --override --silent --toolkit --no-man-page --no-drm --no-opengl-libs --installpath=/opt/OpenSYCL/cuda || true
echo "CUDA Version ${{inputs.cuda}}" | sudo tee /opt/OpenSYCL/cuda/version.txt

- name: install ROCm
run: |
[[ ${{inputs.rocm}} == 4.0.1 ]] && CODENAME=xenial
[[ ${{inputs.rocm}} == 5.4.3 ]] && CODENAME=focal
sudo apt install libnuma-dev cmake unzip
wget -q -O - https://repo.radeon.com/rocm/rocm.gpg.key | sudo apt-key add -
echo "deb [arch=amd64] https://repo.radeon.com/rocm/apt/${{inputs.rocm}} $CODENAME main" | sudo tee /etc/apt/sources.list.d/rocm.list
printf 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' | sudo tee /etc/apt/preferences.d/rocm-pin-600
sudo apt update
sudo apt install rocm-dev

- name: install LLVM
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh ${{inputs.clang}}
sudo apt install libclang-${{inputs.clang}}-dev clang-tools-${{inputs.clang}} libomp-${{inputs.clang}}-dev

- name: install Ninja-build
run: sudo apt install ninja-build


- name: configure & install OpenSycl
run: |
cd sycl_compiler_gits/opensycl
cmake -DCMAKE_CXX_COMPILER=/usr/bin/clang++-${{inputs.clang}} -DCLANG_EXECUTABLE_PATH=/usr/bin/clang++-${{inputs.clang}} -DLLVM_DIR=/usr/lib/llvm-${{inputs.clang}}/cmake -DCMAKE_INSTALL_PREFIX=../../sycl_compilers/opensycl .
make -j install

- name: 'Tar opensycl'
run: tar -cvf opensycl.tar sycl_compilers/opensycl

- name: 'Upload Artifact'
uses: actions/upload-artifact@v3
with:
name: OpenSYCL_compiler-${{ inputs.clang }}-${{ inputs.os }}-${{inputs.cuda}}-${{inputs.rocm}}
path: opensycl.tar
52 changes: 52 additions & 0 deletions .github/workflows/macos-opensycl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: OpenSYCL linux pipeline

on:
workflow_call:
inputs:
os:
required: true
type: string



jobs:

cache_opensycl:
name: cache opensycl
runs-on: ${{ inputs.os }}

steps:

- uses: actions/checkout@v3

- name: clone OpenSycl
run: git submodule update --init sycl_compiler_gits/opensycl

# see opensycl workflow for steps
- name: install dependencies
run: |
set +e
brew update
brew install cmake
brew install libomp
brew install boost
set -e

- name: configure & install OpenSycl
run: |
cd sycl_compiler_gits/opensycl

OMP_ROOT=`brew list libomp | grep libomp.a | sed -E "s/\/lib\/.*//"`
echo "OMP_ROOT=${OMP_ROOT}" >> $GITHUB_ENV

cmake -DOpenMP_ROOT=$OMP_ROOT -DCMAKE_INSTALL_PREFIX=../../sycl_compilers/opensycl .
make -j install

- name: 'Tar opensycl'
run: tar -cvf opensycl.tar sycl_compilers/opensycl

- name: 'Upload Artifact'
uses: actions/upload-artifact@v3
with:
name: OpenSYCL_compiler-${{ inputs.os }}
path: opensycl.tar