[nocommit] New CI baseline experimentation #61
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Flashlight" | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: "Build on ${{ matrix.os }} | tensor: ${{ matrix.backend }} | autograd: ${{ matrix.autograd_backend }}" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, windows-2022, macOS-12] | |
backend: [ArrayFire, oneDNN] | |
autograd_backend: [oneDNN] | |
exclude: | |
- os: windows-2022 | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v3 | |
# ]----- Backend dependencies | |
# ArrayFire | |
- name: "Install ArrayFire (Linux)" | |
run: | | |
sudo apt update | |
sudo apt-key adv --fetch-key https://repo.arrayfire.com/GPG-PUB-KEY-ARRAYFIRE-2020.PUB | |
echo "deb [arch=amd64] https://repo.arrayfire.com/debian all main" | sudo tee /etc/apt/sources.list.d/arrayfire.list | |
sudo apt update | |
sudo apt install arrayfire-cmake=3.8.1-2 arrayfire-headers=3.8.1-2 arrayfire-cpu3-mkl=3.8.1-2 arrayfire-cpu3-dev=3.8.1-2 | |
if: runner.os == 'Linux' && matrix.backend == 'ArrayFire' | |
- name: "Install ArrayFire (macOS)" | |
run: brew install arrayfire | |
if: runner.os == 'macOS' && matrix.backend == 'ArrayFire' | |
# - name: "Install ArrayFire on Windows" | |
# run: | | |
# cd /tmp | |
# wget -q https://arrayfire.s3.amazonaws.com/3.8.1/ArrayFire-v3.8.1-CUDA-11.4.exe | |
# ./ArrayFire-v3.8.1-CUDA-11.4.exe --skip-license | |
# if: runner.os == 'Windows' && matrix.backend == 'ArrayFire' | |
# oneDNN | |
- name: Install oneDNN 2.7.2 with microconda | |
uses: mamba-org/provision-with-micromamba@main | |
with: | |
environment-file: false | |
environment-name: flashlight | |
channels: conda-forge | |
extra-specs: onednn=2.7.2 | |
if: matrix.backend == 'oneDNN' || matrix.autograd_backend == 'oneDNN' | |
# Build | |
- name: "Configure Flashlight" | |
run: | | |
cmake -S . -B build -DBUILD_SHARED_LIBS=ON \ | |
-DFL_USE_ARRAYFIRE=${{ matrix.backend == 'ArrayFire' && 'ON' || 'OFF' }} \ | |
-DFL_ARRAYFIRE_USE_CPU=${{ matrix.backend == 'ArrayFire' && 'ON' || 'OFF' }} \ | |
-DFL_USE_ONEDNN=${{ (matrix.backend == 'oneDNN' || matrix.autograd_backend == 'oneDNN') && 'ON' || 'OFF' }} \ | |
-DFL_BUILD_DISTRIBUTED=OFF | |
- name: "Build Flashlight" | |
run: | | |
cmake --build build --parallel 4 | |
# Test | |
# - name: "Run Flashlight tests" | |
# run: | | |
# cd build | |
# ctest --output-on-failure -j 4 | |
# if: matrix.backend == 'ArrayFire' && matrix.autograd_backend == 'oneDNN' |