Skip to content

Commit

Permalink
run opt/non-opt bench in ci
Browse files Browse the repository at this point in the history
Signed-off-by: Thing-han, Lim <[email protected]>
  • Loading branch information
potsrevennil committed Sep 12, 2024
1 parent 13b94d9 commit 136d3a9
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/actions/bench/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ inputs:
archflags:
description: ARCHFLAGS to pass to compilation
default: ""
opt:
description: opt flag to set for tests script
default: "true"
bench_extra_args:
description: Further arguments to be appended to command line for `bench` script
default: ""
Expand Down Expand Up @@ -59,7 +62,7 @@ runs:
- name: Run benchmark
shell: ${{ env.SHELL }}
run: |
tests bench -c ${{ inputs.perf }} --cflags "${{ inputs.cflags }}" --arch-flags "${{ inputs.archflags }}" -v --output output.json ${{ inputs.bench_extra_args }}
tests bench -c ${{ inputs.perf }} --cflags "${{ inputs.cflags }}" --arch-flags "${{ inputs.archflags }}" --opt "${{ inputs.opt }}" -v --output output.json ${{ inputs.bench_extra_args }}
- name: Store benchmark result
if: ${{ inputs.store_results == true }}
uses: benchmark-action/github-action-benchmark@v1
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/bench_ec2_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,18 @@ jobs:
permissions:
contents: 'read'
id-token: 'write'
strategy:
fail-fast: false
matrix:
opt: [true, false]
uses: ./.github/workflows/bench_ec2_reusable.yml
if: github.repository_owner == 'pq-code-package' && (github.event.label.name == 'benchmark' || github.ref == 'refs/heads/main')
with:
ec2_instance_type: t4g.small
ec2_ami: ubuntu-latest (aarch64)
archflags: -mcpu=cortex-a76 -march=armv8.2-a
cflags: -DFORCE_AARCH64
opt: ${{ matrix.opt }}
store_results: true
name: Graviton2
secrets: inherit
Expand All @@ -29,13 +34,18 @@ jobs:
permissions:
contents: 'read'
id-token: 'write'
strategy:
fail-fast: false
matrix:
opt: [true, false]
uses: ./.github/workflows/bench_ec2_reusable.yml
if: github.repository_owner == 'pq-code-package' && (github.event.label.name == 'benchmark' || github.ref == 'refs/heads/main')
with:
ec2_instance_type: c7g.medium
ec2_ami: ubuntu-latest (aarch64)
archflags: -mcpu=neoverse-v1 -march=armv8.4-a
cflags: -DFORCE_AARCH64
opt: ${{ matrix.opt }}
store_results: true
name: Graviton3
secrets: inherit
5 changes: 5 additions & 0 deletions .github/workflows/bench_ec2_any.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ on:
archflags:
description: Custom ARCH flags for compilation
default: -mcpu=cortex-a76 -march=armv8.2-a
opt:
description: Run with optimized code if enabled
type: boolean
default: true
store_results:
description: Indicates if results should be pushed to github pages
type: boolean
Expand All @@ -49,6 +53,7 @@ jobs:
ec2_ami_id: ${{ inputs.ec2_ami_id }}
cflags: ${{ inputs.cflags }}
archflags: ${{ inputs.archflags }}
opt: ${{ inputs.opt }}
name: ${{ inputs.name }}
store_results: ${{ inputs.store_results }}
always_terminate: ${{ inputs.always_terminate }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/bench_ec2_reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ on:
type: string
description: Custom ARCH flags for compilation
default: -mcpu=neoverse-n1 -march=armv8.2-a
opt:
type: boolean
description: Runs with optimized code if enabled.
default: true
store_results:
type: boolean
description: Indicates if results should be pushed to github pages
Expand Down Expand Up @@ -102,6 +106,7 @@ jobs:
name: ${{ inputs.name }}
cflags: ${{ inputs.cflags }}
archflags: ${{ inputs.archflags }}
opt: ${{ inputs.opt }}
perf: PERF
store_results: ${{ inputs.store_results }}
bench_extra_args: ${{ inputs.bench_extra_args }}
Expand Down

0 comments on commit 136d3a9

Please sign in to comment.