|
| 1 | +name: ASV Benchmark on arm64 graviton cirun |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - develop |
| 7 | + - release-** |
| 8 | + pull_request: |
| 9 | + branches: |
| 10 | + - develop |
| 11 | + - release-** |
| 12 | + |
| 13 | +concurrency: |
| 14 | + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} |
| 15 | + cancel-in-progress: true |
| 16 | + |
| 17 | +permissions: |
| 18 | + contents: read # to fetch code (actions/checkout) |
| 19 | + |
| 20 | +env: |
| 21 | + # GITHUB_TOKEN: ${{ secrets.OB_BENCH_TOKEN }} |
| 22 | + # BENCHMARKS_REPO: ev-br/ob-bench-asv |
| 23 | + ASV_CONFIG: asv.conf.json |
| 24 | + MACHINE_NAME: github-actions-cirun-graviton # to identify github actions machine as hostname changes everytime |
| 25 | + |
| 26 | +jobs: |
| 27 | + build: |
| 28 | + if: "github.repository == 'OpenMathLib/BLAS-Benchmarks'" |
| 29 | + runs-on: "cirun-aws-runner-graviton--${{ github.run_id }}" |
| 30 | + |
| 31 | + strategy: |
| 32 | + fail-fast: false |
| 33 | + matrix: |
| 34 | + fortran: [gfortran] |
| 35 | + build: [make] |
| 36 | + |
| 37 | + steps: |
| 38 | + - uses: actions/checkout@v4 |
| 39 | + with: |
| 40 | + fetch-depth: 0 # To fetch all commits to be able to generate benchmarks html |
| 41 | + |
| 42 | + - name: Print system information |
| 43 | + run: | |
| 44 | + if [ "$RUNNER_OS" == "Linux" ]; then |
| 45 | + cat /proc/cpuinfo |
| 46 | + else |
| 47 | + echo "::error::$RUNNER_OS not supported" |
| 48 | + exit 1 |
| 49 | + fi |
| 50 | +
|
| 51 | + - name: Install system dependencies |
| 52 | + run: | |
| 53 | + if [ "$RUNNER_OS" == "Linux" ]; then |
| 54 | + sudo apt update |
| 55 | + sudo apt-get install -y gfortran cmake ccache libtinfo5 python3-pip pkg-config |
| 56 | + else |
| 57 | + echo "::error::$RUNNER_OS not supported" |
| 58 | + exit 1 |
| 59 | + fi |
| 60 | +
|
| 61 | + - name: Install python dependencies |
| 62 | + run: | |
| 63 | + pip3 install numpy meson meson-python ninja build asv virtualenv |
| 64 | + # pip3 install scipy_openblas32 |
| 65 | + # install the nightly OpenBLAS wheel |
| 66 | + pip install -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy-openblas32 |
| 67 | + python3 -c'import scipy_openblas32 as so; print(so.get_pkg_config())' > scipy_openblas.pc |
| 68 | + export PKG_CONFIG_PATH=$PWD |
| 69 | + echo ">>>> PKG_CONFIG" $PKG_CONFIG_PATH |
| 70 | + cat scipy_openblas.pc |
| 71 | +
|
| 72 | + - name: Set and log asv machine configuration |
| 73 | + run: | |
| 74 | + cd benchmark/pybench/asv |
| 75 | + python3 -m asv machine --yes --config asv.conf.json |
| 76 | + echo "Machine Configuration:" |
| 77 | + cat ~/.asv-machine.json |
| 78 | + rm ~/.asv-machine.json |
| 79 | +
|
| 80 | + echo "Setting machine name to $MACHINE_NAME" |
| 81 | + python3 -m asv machine --machine $MACHINE_NAME --yes --config $ASV_CONFIG -v |
| 82 | + cat ~/.asv-machine.json |
| 83 | +
|
| 84 | + - name: Run benchmarks |
| 85 | + run: | |
| 86 | + echo ${{ github.workspace}} |
| 87 | + cd benchmark/pybench/asv |
| 88 | + python3 -m asv run --config $ASV_CONFIG -v |
| 89 | + env: |
| 90 | + PKG_CONFIG_PATH: ${{ github.workspace }} |
| 91 | + |
0 commit comments