-
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: add ideal-kmhv3 performance test
Change-Id: Ib4acee3730bd83a717b74fdc9dcadfd38cecdd88
- Loading branch information
1 parent
f77ecd2
commit 82ca70f
Showing
2 changed files
with
76 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: gem5 Ideal Performance Test | ||
|
||
on: | ||
push: | ||
branches: [ xs-dev ] | ||
pull_request: | ||
branches: [ xs-dev ] | ||
|
||
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 [email protected]:umd-memsys/DRAMSim3.git DRAMsim3 | ||
cd DRAMsim3 && mkdir -p build | ||
cd build | ||
cmake .. | ||
make -j 48 | ||
cd $GEM5_HOME | ||
- name: Build GEM5 opt | ||
run: CC=gcc CXX=g++ scons build/RISCV/gem5.opt --linker=gold -j64 | ||
- name: XS-GEM5 - Run performance test | ||
# run 80% coverage spec06 checkpoints, 500+ checkpoints | ||
run: | | ||
export GCBV_REF_SO="/nfs-nvme/home/share/zhenhao/ref-h/build/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 ../kmh_v3_ideal.sh` \ | ||
/nfs/home/yanyue/workspace/spec06_cpts/spec_0.8c_int.lst \ | ||
/nfs/home/share/jiaxiaoyu/simpoint_checkpoint_archive/spec06_rv64gcb_O3_20m_gcc12.2.0-intFpcOff-jeMalloc/zstd-checkpoint-0-0-0 \ | ||
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/yanyue/workspace/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
script_dir=$(dirname -- "$( readlink -f -- "$0"; )") | ||
source $script_dir/common.sh | ||
|
||
for var in GCBV_REF_SO GCB_RESTORER gem5_home; do | ||
checkForVariable $var | ||
done | ||
|
||
$gem5 $gem5_home/configs/example/xiangshan.py --ideal-kmhv3 --generic-rv-cpt=$1 |