Benchmark Release #25
This file contains hidden or 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' | |
| workflow_dispatch: | |
| jobs: | |
| build_linux: | |
| name: Build for linux | |
| runs-on: ${{ matrix.os }} | |
| continue-on-error: true | |
| strategy: | |
| max-parallel: 8 | |
| 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, 5.0.0] | |
| os: [ubuntu-22.04, ubuntu-24.04] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: true | |
| - name: Install dependencies | |
| run: | | |
| git clone https://gitlab.com/libeigen/eigen | |
| pushd eigen | |
| git checkout tags/${{ matrix.eigenversion }} | |
| popd | |
| mv eigen include | |
| - name: Set C++ standard for Eigen 5.x | |
| id: cxx_standard | |
| run: | | |
| if [[ "${{ matrix.eigenversion }}" == 5.* ]]; then | |
| echo "cxx_standard=14" >> $GITHUB_OUTPUT | |
| else | |
| echo "cxx_standard=11" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Build | |
| run: | | |
| export EIGEN_PATH=`pwd`/include | |
| mkdir build && cd build | |
| cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=${{ steps.cxx_standard.outputs.cxx_standard }} -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.10" | |
| - name: Test Reference | |
| run: | | |
| pip install scipy | |
| python benchmark/comp_scipy.py | |
| build_macos: | |
| name: Build for macOS (Intel) | |
| runs-on: macos-15-intel | |
| continue-on-error: true | |
| strategy: | |
| max-parallel: 8 | |
| matrix: | |
| arch: [DEIGEN_DONT_VECTORIZE, msse2, mavx] | |
| eigenversion: [3.3.5, 3.3.6, 3.3.7, 3.3.8, 3.3.9, 3.4.0, 5.0.0] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: true | |
| - 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: Set C++ standard for Eigen 5.x | |
| id: cxx_standard | |
| run: | | |
| if [[ "${{ matrix.eigenversion }}" == 5.* ]]; then | |
| echo "cxx_standard=14" >> $GITHUB_OUTPUT | |
| else | |
| echo "cxx_standard=11" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Build | |
| run: | | |
| export EIGEN_PATH=`pwd`/include | |
| mkdir build && cd build | |
| cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=${{ steps.cxx_standard.outputs.cxx_standard }} -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.10" | |
| - name: Test Reference | |
| run: | | |
| pip install scipy | |
| python benchmark/comp_scipy.py | |
| build_windows: | |
| name: Build for Windows | |
| runs-on: windows-2022 | |
| continue-on-error: true | |
| strategy: | |
| max-parallel: 8 | |
| 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, 5.0.0] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: true | |
| - 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: Set C++ standard for Eigen 5.x | |
| id: cxx_standard | |
| shell: pwsh | |
| run: | | |
| if ("${{ matrix.eigenversion }}" -like "5.*") { | |
| echo "cxx_standard=14" >> $env:GITHUB_OUTPUT | |
| } else { | |
| echo "cxx_standard=11" >> $env:GITHUB_OUTPUT | |
| } | |
| - name: Build | |
| run: | | |
| cmake -B build -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=${{ steps.cxx_standard.outputs.cxx_standard }} -DEIGENRAND_CXX_FLAGS="${{ matrix.arch }} /I${{ env.EIGEN_PATH }}" | |
| cmake --build build --config Release | |
| - 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.10" | |
| - name: Test Reference | |
| run: | | |
| pip install scipy | |
| python benchmark/comp_scipy.py | |
| build_linux_arm64: | |
| name: Build for linux (Arm64) | |
| runs-on: ${{ matrix.os }} | |
| continue-on-error: true | |
| strategy: | |
| max-parallel: 8 | |
| matrix: | |
| arch: [DEIGEN_DONT_VECTORIZE, march=armv8-a+simd] | |
| eigenversion: [3.3.4, 3.3.5, 3.3.6, 3.3.7, 3.3.8, 3.3.9, 3.4.0, 5.0.0] | |
| os: [ubuntu-22.04-arm64, ubuntu-24.04-arm64] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: true | |
| - name: Install dependencies | |
| run: | | |
| git clone https://gitlab.com/libeigen/eigen | |
| pushd eigen | |
| git checkout tags/${{ matrix.eigenversion }} | |
| popd | |
| mv eigen include | |
| - name: Set C++ standard for Eigen 5.x | |
| id: cxx_standard | |
| run: | | |
| if [[ "${{ matrix.eigenversion }}" == 5.* ]]; then | |
| echo "cxx_standard=14" >> $GITHUB_OUTPUT | |
| else | |
| echo "cxx_standard=11" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Build | |
| run: | | |
| export EIGEN_PATH=`pwd`/include | |
| mkdir build && cd build | |
| cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=${{ steps.cxx_standard.outputs.cxx_standard }} -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.10" | |
| - name: Test Reference | |
| run: | | |
| pip install scipy | |
| python benchmark/comp_scipy.py | |
| build_macos_arm64: | |
| name: Build for macOS (Arm64) | |
| runs-on: macos-15 | |
| continue-on-error: true | |
| strategy: | |
| max-parallel: 8 | |
| matrix: | |
| arch: [DEIGEN_DONT_VECTORIZE, march=armv8-a+simd] | |
| eigenversion: [3.3.5, 3.3.6, 3.3.7, 3.3.8, 3.3.9, 3.4.0, 5.0.0] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: true | |
| - 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: Set C++ standard for Eigen 5.x | |
| id: cxx_standard | |
| run: | | |
| if [[ "${{ matrix.eigenversion }}" == 5.* ]]; then | |
| echo "cxx_standard=14" >> $GITHUB_OUTPUT | |
| else | |
| echo "cxx_standard=11" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Build | |
| run: | | |
| export EIGEN_PATH=`pwd`/include | |
| mkdir build && cd build | |
| cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=${{ steps.cxx_standard.outputs.cxx_standard }} -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.10" | |
| - name: Test Reference | |
| run: | | |
| pip install scipy | |
| python benchmark/comp_scipy.py |