-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
util: CI: use template for gem5-ideal-perf, gem5-perf
use reuseable template code for CI! Change-Id: Ie10cb6b7cb40cc15c1cf7f48c0b58b0a65bcba9a
- Loading branch information
1 parent
04e95c3
commit 019b24c
Showing
3 changed files
with
86 additions
and
136 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: gem5 Performance Test Template | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
script_path: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
run_performance_test: | ||
runs-on: self-hosted | ||
continue-on-error: false | ||
name: XS-GEM5 - Run performance test | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build DRAMSim | ||
run: | | ||
export GEM5_HOME=$(pwd) | ||
cd ext/dramsim3 | ||
git clone https://github.com/umd-memsys/DRAMsim3.git DRAMsim3 | ||
cd DRAMsim3 && mkdir -p build | ||
cd build | ||
cmake .. | ||
make -j 48 | ||
cd $GEM5_HOME | ||
- name: Build GEM5 opt | ||
run: | | ||
# use pgo profile to build gem5 | ||
export GEM5_HOME=$(pwd) | ||
export GCBV_REF_SO="/nfs/home/share/gem5_ci/ref/normal/riscv64-nemu-interpreter-so" | ||
bash util/pgo/basic_pgo_new.sh | ||
- name: XS-GEM5 - Run performance test | ||
# run 80% coverage spec06 checkpoints, 500+ checkpoints | ||
run: | | ||
# 根据机器名判断当前环境在小机房还是大机房 | ||
if [[ $(hostname) == open* ]]; then | ||
export CHECKPOINT_ROOT="/nfs/home/share/jiaxiaoyu/simpoint_checkpoint_archive/spec06_rv64gcb_O3_20m_gcc12.2.0-intFpcOff-jeMalloc/zstd-checkpoint-0-0-0" | ||
else | ||
export CHECKPOINT_ROOT="/nfs/home/share/jiaxiaoyu/simpoint_checkpoint_zstd_format/spec06_rv64gcb_O3_20m_gcc12.2.0-intFpcOff-jeMalloc" | ||
fi | ||
export GCBV_REF_SO="/nfs/home/share/gem5_ci/ref/normal/riscv64-nemu-interpreter-so" | ||
export GCB_RESTORER="" | ||
export GEM5_HOME=$(pwd) | ||
mkdir -p $GEM5_HOME/util/xs_scripts/test | ||
cd $GEM5_HOME/util/xs_scripts/test | ||
bash ../parallel_sim.sh `realpath ${{ inputs.script_path }}` \ | ||
/nfs/home/share/gem5_ci/spec06_cpts/spec_0.8c_int.lst \ | ||
$CHECKPOINT_ROOT \ | ||
spec_all | ||
- name: Setup gem5_data_proc environment | ||
run: | | ||
# 克隆数据处理仓库到 CI 工作目录 | ||
cd $GITHUB_WORKSPACE | ||
git clone https://github.com/shinezyy/gem5_data_proc | ||
- name: Check performance test result | ||
run: | | ||
# 添加yanyue的 Python 包路径, 包含pandas等 | ||
export PYTHONPATH=/nfs/home/yanyue/.local/lib/python3.10/site-packages:$PYTHONPATH | ||
# 每次run 会进入新的shell, 需要重新设置GEM5_HOME | ||
export GEM5_HOME=$GITHUB_WORKSPACE | ||
cd $GITHUB_WORKSPACE/gem5_data_proc | ||
# 使用已有的数据spec_all生成测试报告 | ||
bash example-scripts/gem5-score-ci.sh \ | ||
$GEM5_HOME/util/xs_scripts/test/spec_all \ | ||
/nfs/home/share/gem5_ci/spec06_cpts/cluster-0-0.json \ | ||
> $GITHUB_WORKSPACE/score.txt | ||
# 提取最后42行score信息 | ||
echo "### performance test result :rocket:" >> $GITHUB_STEP_SUMMARY | ||
echo '```' >> $GITHUB_STEP_SUMMARY | ||
tail -n 42 $GITHUB_WORKSPACE/score.txt >> $GITHUB_STEP_SUMMARY | ||
echo '```' >> $GITHUB_STEP_SUMMARY | ||
# 提取关键指标 | ||
FINAL_SCORE=$(grep "Estimated Int score per GHz:" $GITHUB_WORKSPACE/score.txt | awk '{print $NF}') | ||
echo "### Key indicators" >> $GITHUB_STEP_SUMMARY | ||
echo "- Final Int score per GHz: **${FINAL_SCORE}**" >> $GITHUB_STEP_SUMMARY | ||
This file contains 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