Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion .github/workflows/gem5-perf-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ on:
required: false
type: string
description: "Benchmark type: base, simple"
ddr_config:
required: false
type: string
description: "DRAMsim3 DDR config: 2ch or 8ch. Empty/default maps to 2ch."
default: "2ch"
check_result:
required: false
type: boolean
Expand Down Expand Up @@ -217,6 +222,7 @@ jobs:
echo "run_number: $RUN_NUMBER" >> "$TARGET_DIR/metadata.txt"
echo "benchmark_type: ${{ inputs.benchmark_type }}" >> "$TARGET_DIR/metadata.txt"
echo "specific_benchmarks: ${{ inputs.specific_benchmarks }}" >> "$TARGET_DIR/metadata.txt"
echo "ddr_config: ${{ inputs.ddr_config }}" >> "$TARGET_DIR/metadata.txt"
Comment thread
edwu186 marked this conversation as resolved.
echo "workflow_run_id: ${{ github.run_id }}" >> "$TARGET_DIR/metadata.txt"

{
Expand Down Expand Up @@ -251,12 +257,28 @@ jobs:
export GCB_MULTI_CORE_RESTORER=""
fi

extra_args="${{ inputs.extra_args }}"
case "${{ inputs.ddr_config }}" in
default|""|2ch)
extra_args="${extra_args} --dramsim3-ini=$GEM5_HOME/ext/dramsim3/xiangshan_configs/xiangshan_DDR4_8Gb_x8_3200_2ch.ini"
;;
8ch)
extra_args="${extra_args} --dramsim3-ini=$GEM5_HOME/ext/dramsim3/xiangshan_configs/xiangshan_DDR4_8Gb_x8_3200_8ch.ini"
;;
*)
echo "Error: Invalid ddr_config '${{ inputs.ddr_config }}'. Must be one of: 2ch, 8ch"
exit 1
;;
esac
extra_args="$(echo "$extra_args" | xargs)"
echo "Resolved extra gem5 args: $extra_args"

bash "$GEM5_HOME/util/xs_scripts/parallel_sim.sh" "$(realpath "$CONFIG_PATH")" \
${{ steps.config.outputs.checkpoint_list }} \
${{ steps.config.outputs.checkpoint_root_node}} \
spec_all \
"${{ inputs.specific_benchmarks }}" \
"${{ inputs.extra_args }}"
"$extra_args"
- name: Setup gem5_data_proc environment
run: |
# 使用本地数据处理仓库,避免GitHub网络问题
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/manual-perf.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Manual Performance Test
run-name: ${{ format('{0} - {1} - {2}{3} - {4} - {5}', github.event.inputs.note || 'Manual Performance Test', github.event.inputs.configuration, github.event.inputs.benchmark_type, github.event.inputs.specific_benchmarks && format(' ({0})', github.event.inputs.specific_benchmarks) || '', github.event.inputs.branch || github.ref_name, github.event.inputs.vector_type) }}
run-name: ${{ format('{0} - {1} - {2}{3} - {4} - {5} - {6}', github.event.inputs.note || 'Manual Performance Test', github.event.inputs.configuration, github.event.inputs.benchmark_type, github.event.inputs.specific_benchmarks && format(' ({0})', github.event.inputs.specific_benchmarks) || '', github.event.inputs.branch || github.ref_name, github.event.inputs.vector_type, github.event.inputs.ddr_config) }}

on:
workflow_dispatch:
Expand Down Expand Up @@ -49,6 +49,14 @@ on:
options:
- base
- simple
ddr_config:
description: 'DRAMsim3 DDR config'
required: false
type: choice
default: '2ch'
options:
- 2ch
- 8ch
branch:
description: 'Branch, tag or SHA to test (leave empty for current branch)'
required: false
Expand All @@ -59,18 +67,15 @@ jobs:
runs-on: ubuntu-latest
outputs:
config_path: ${{ steps.resolve.outputs.config_path }}
extra_args: ${{ steps.resolve.outputs.extra_args }}
pr_sha: ${{ steps.resolve.outputs.pr_sha }}
steps:
- name: Resolve parameters
id: resolve
run: |
if [[ "${{ github.event.inputs.benchmark_type }}" == gcc12-spec06-smt-* ]]; then
echo "config_path=configs/example/smt_idealkmhv3.py" >> $GITHUB_OUTPUT
echo "extra_args=" >> $GITHUB_OUTPUT
else
echo "config_path=configs/example/${{ github.event.inputs.configuration }}" >> $GITHUB_OUTPUT
echo "extra_args=" >> $GITHUB_OUTPUT
fi

if [ -n "${{ github.event.inputs.branch }}" ]; then
Expand All @@ -84,9 +89,9 @@ jobs:
uses: ./.github/workflows/gem5-perf-template.yml
with:
config_path: ${{ needs.setup.outputs.config_path }}
extra_args: ${{ needs.setup.outputs.extra_args }}
benchmark_type: ${{ github.event.inputs.benchmark_type }}
specific_benchmarks: ${{ github.event.inputs.specific_benchmarks }}
vector_type: ${{ github.event.inputs.vector_type }}
ddr_config: ${{ github.event.inputs.ddr_config }}
pr_sha: ${{ needs.setup.outputs.pr_sha }}
check_result: true