Skip to content

Commit f5d7c59

Browse files
committed
util: add Manual Performance Test workflow
- Introduced a new GitHub Actions workflow for Manual Performance Test, allowing users to select configurations, benchmark types, and branches for performance testing. Change-Id: I4290cde197dd6535ca2a0710c5762e3132da49d8
1 parent d0b82f9 commit f5d7c59

File tree

2 files changed

+81
-0
lines changed

2 files changed

+81
-0
lines changed

.github/workflows/manual-perf.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Manual Performance Test
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
configuration:
7+
description: 'Choose Kunminghu configuration'
8+
required: true
9+
type: choice
10+
default: 'idealkmhv3.py'
11+
options:
12+
- 'kmhv2.py'
13+
- 'kmhv3.py'
14+
- 'idealkmhv3.py'
15+
benchmark_type:
16+
description: 'Benchmark coverage type'
17+
required: true
18+
type: choice
19+
default: 'spec06-0.8c'
20+
options:
21+
- spec06-0.3c
22+
- spec06-0.8c
23+
- spec06-1.0c
24+
- spec17-1.0c
25+
- spec06-rvv-1.0c
26+
- spec06int-rvv-0.8c
27+
vector_type:
28+
description: 'Vector decode strategy (only for rvv benchmarks)'
29+
required: false
30+
type: choice
31+
default: 'base'
32+
options:
33+
- base
34+
- simple
35+
branch:
36+
description: 'Branch, tag or SHA to test (leave empty for current branch)'
37+
required: false
38+
type: string
39+
40+
jobs:
41+
setup:
42+
runs-on: ubuntu-latest
43+
outputs:
44+
script_path: ${{ steps.resolve.outputs.script_path }}
45+
pr_sha: ${{ steps.resolve.outputs.pr_sha }}
46+
steps:
47+
- name: Resolve parameters
48+
id: resolve
49+
run: |
50+
case "${{ github.event.inputs.configuration }}" in
51+
"kmhv2.py")
52+
echo "script_path=../kmh_6wide.sh" >> $GITHUB_OUTPUT
53+
;;
54+
"kmhv3.py")
55+
echo "script_path=../kmh_v3_btb.sh" >> $GITHUB_OUTPUT
56+
;;
57+
"idealkmhv3.py")
58+
echo "script_path=../kmh_v3_ideal.sh" >> $GITHUB_OUTPUT
59+
;;
60+
*)
61+
echo "Error: unsupported configuration '${{ github.event.inputs.configuration }}'" >&2
62+
exit 1
63+
;;
64+
esac
65+
66+
if [ -n "${{ github.event.inputs.branch }}" ]; then
67+
echo "pr_sha=${{ github.event.inputs.branch }}" >> $GITHUB_OUTPUT
68+
else
69+
echo "pr_sha=${{ github.sha }}" >> $GITHUB_OUTPUT
70+
fi
71+
72+
perf_test:
73+
needs: setup
74+
uses: ./.github/workflows/gem5-perf-template.yml
75+
with:
76+
script_path: ${{ needs.setup.outputs.script_path }}
77+
benchmark_type: ${{ github.event.inputs.benchmark_type }}
78+
vector_type: ${{ github.event.inputs.vector_type }}
79+
pr_sha: ${{ needs.setup.outputs.pr_sha }}
80+
check_result: true

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ Note:
5858
- The V3 RTL BPU predictor and backend updates are still being implemented. Several performance switches remain off in `kmhv3.py` to stay aligned with the RTL snapshot; as RTL work lands, we will re-enable them and expect the mainline V3 scores to pull ahead of V2.
5959
- A score with 0.3c would be 1 point higher by default than a score with 0.8c, and 1.2 points higher by default than a score with 1c, so benchmark scores with different coverage cannot be directly compared.
6060
- You can trigger kmhv3.py by *-align* branch suffix, e.g., `feature-xyz-align`. trigger idealkmhv3.py by *-perf* suffix.
61+
- You can also manually trigger a performance test with custom configuration and coverage via the `Manual Performance Test` CI in the Actions tab.
6162

6263
## Branches
6364

0 commit comments

Comments
 (0)