Update README.md #22
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: Benchmark Release | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
- '!v*.*.*d' | |
jobs: | |
build_linux: | |
name: Build for linux | |
runs-on: ${{ matrix.os }} | |
strategy: | |
max-parallel: 4 | |
matrix: | |
arch: [DEIGEN_DONT_VECTORIZE, msse2, mavx, mavx2] | |
eigenversion: [3.3.4, 3.3.5, 3.3.6, 3.3.7, 3.3.8, 3.3.9, 3.4.0] | |
os: [ubuntu-18.04,ubuntu-20.04,ubuntu-22.04] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
git clone https://gitlab.com/libeigen/eigen | |
pushd eigen | |
git checkout tags/${{ matrix.eigenversion }} | |
popd | |
mv eigen include | |
- name: Build | |
run: | | |
export EIGEN_PATH=`pwd`/include | |
mkdir build && cd build | |
cmake -DCMAKE_BUILD_TYPE=Release -DEIGENRAND_CXX_FLAGS="-${{ matrix.arch }} -I${EIGEN_PATH}" ../ | |
make | |
- name: CPU info | |
run: cat /proc/cpuinfo | |
- name: Run Bench | |
run: | | |
./build/EigenRand-benchmark | |
- name: Run BenchMv | |
run: | | |
./build/EigenRand-benchmark-mv | |
- name: Run BenchVop | |
run: | | |
./build/EigenRand-benchmark-vop | |
- name: Run Accuracy | |
run: | | |
./build/EigenRand-accuracy | |
- name: Set up Python3 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
architecture: x64 | |
- name: Test Reference | |
run: | | |
pip install scipy | |
python benchmark/comp_scipy.py | |
build_macos: | |
name: Build for macOS | |
runs-on: macOS-10.15 | |
strategy: | |
max-parallel: 4 | |
matrix: | |
arch: [DEIGEN_DONT_VECTORIZE, msse2, mavx] | |
eigenversion: [3.3.4, 3.3.5, 3.3.6, 3.3.7, 3.3.8, 3.3.9, 3.4.0] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
wget https://gitlab.com/libeigen/eigen/-/archive/${{ matrix.eigenversion }}/eigen-${{ matrix.eigenversion }}.tar.gz | |
tar -zxvf eigen-${{ matrix.eigenversion }}.tar.gz | |
mv eigen-${{ matrix.eigenversion }} include | |
- name: Build | |
run: | | |
export EIGEN_PATH=`pwd`/include | |
mkdir build && cd build | |
cmake -DCMAKE_BUILD_TYPE=Release -DEIGENRAND_CXX_FLAGS="-${{ matrix.arch }} -I${EIGEN_PATH}" ../ | |
make | |
- name: CPU info | |
run: sysctl -a | grep machdep.cpu | |
- name: Run Bench | |
continue-on-error: true | |
run: | | |
./build/EigenRand-benchmark | |
- name: Run BenchMv | |
continue-on-error: true | |
run: | | |
./build/EigenRand-benchmark-mv | |
- name: Run BenchVop | |
continue-on-error: true | |
run: | | |
./build/EigenRand-benchmark-vop | |
- name: Run Accuracy | |
run: | | |
./build/EigenRand-accuracy | |
- name: Set up Python3 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
architecture: x64 | |
- name: Test Reference | |
run: | | |
pip install scipy | |
python benchmark/comp_scipy.py | |
build_windows: | |
name: Build for Windows | |
runs-on: windows-2019 | |
strategy: | |
max-parallel: 4 | |
matrix: | |
arch: ['/D EIGEN_DONT_VECTORIZE', '/arch:SSE2', '/arch:AVX', '/arch:AVX2'] | |
eigenversion: [3.3.4, 3.3.5, 3.3.6, 3.3.7, 3.3.8, 3.3.9, 3.4.0] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
Invoke-WebRequest -OutFile eigen.tar.gz https://gitlab.com/libeigen/eigen/-/archive/${{ matrix.eigenversion }}/eigen-${{ matrix.eigenversion }}.tar.gz | |
tar -zxvf eigen.tar.gz | |
mv eigen-${{ matrix.eigenversion }} include | |
echo "EIGEN_PATH=$(Get-Location)\include" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append | |
- name: Build | |
uses: lukka/run-cmake@v3 | |
with: | |
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced | |
cmakeBuildType: Release | |
buildWithCMake: true | |
cmakeAppendedArgs: -G"Visual Studio 16 2019" -Ax64 -DEIGENRAND_CXX_FLAGS="${{ matrix.arch }} /I${{ env.EIGEN_PATH }}" | |
buildWithCMakeArgs: --config Release | |
buildDirectory: build | |
- name: CPU info | |
run: bash -c "cat /proc/cpuinfo" | |
- name: Run Bench | |
run: | | |
.\build\Release\EigenRand-benchmark.exe | |
- name: Run BenchMv | |
run: | | |
.\build\Release\EigenRand-benchmark-mv.exe | |
- name: Run BenchVop | |
run: | | |
.\build\Release\EigenRand-benchmark-vop.exe | |
- name: Run Accuracy | |
run: | | |
.\build\Release\EigenRand-accuracy.exe | |
- name: Set up Python3 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
architecture: x64 | |
- name: Test Reference | |
run: | | |
pip install scipy | |
python benchmark/comp_scipy.py | |
build-arm64: | |
name: Build for Arm64-Centos7 | |
runs-on: [ubuntu-18.04,ubuntu-20.04,ubuntu-22.04] | |
strategy: | |
max-parallel: 4 | |
matrix: | |
arch: [DEIGEN_DONT_VECTORIZE, march=native] | |
eigenversion: [3.3.4, 3.3.5, 3.3.6, 3.3.7, 3.3.8, 3.3.9, 3.4.0] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: bab2min/run-on-arch-action@use-custom-image | |
id: runcmd | |
with: | |
image: quay.io/pypa/manylinux2014_aarch64 | |
githubToken: ${{ github.token }} | |
setup: | | |
mkdir -p "${PWD}/artifacts" | |
dockerRunArgs: | | |
--volume "${PWD}/artifacts:/artifacts" | |
run: | | |
git clone https://gitlab.com/libeigen/eigen | |
pushd eigen | |
git checkout tags/${{ matrix.eigenversion }} | |
popd | |
mv eigen include | |
export EIGEN_PATH=`pwd`/include | |
mkdir build && cd build | |
cmake -DCMAKE_BUILD_TYPE=Release -DEIGENRAND_CXX_FLAGS="-${{ matrix.arch }} -I${EIGEN_PATH}" ../ | |
make | |
./EigenRand-benchmark 1000 3 | |
./EigenRand-benchmark-mv 10000 3 | |
./EigenRand-benchmark-vop 1000 3 | |
./EigenRand-accuracy 256 |