Skip to content

Commit

Permalink
util: CI: only run spec int 0.8c cpts (#230)
Browse files Browse the repository at this point in the history
* util: CI: seperate perf tests from all CI tests

Change-Id: I7f61ec7edbc6d40422842d6967b772f2515c6797

* util: CI: only run spec int 0.8c cpts

Change-Id: I7f8e3a675c292d65a7b019e926855f0a2039bacd

* util: CI: add ideal-kmhv3 performance test

Change-Id: Ib4acee3730bd83a717b74fdc9dcadfd38cecdd88
  • Loading branch information
jensen-yan authored Dec 14, 2024
1 parent 3e502dc commit 9e99f64
Show file tree
Hide file tree
Showing 4 changed files with 142 additions and 57 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/gem5-ideal-perf.yml
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
66 changes: 66 additions & 0 deletions .github/workflows/gem5-perf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: gem5 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_6wide.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
57 changes: 0 additions & 57 deletions .github/workflows/gem5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,60 +188,3 @@ jobs:
cd $GEM5_HOME/util/xs_scripts/test_h
bash ../kmh_6wide_h.sh /nfs/home/share/jiaxiaoyu/H-ext-checkpoint-uniform-zstd-nosmp/uniform/payload/820000000/_820000000_.zstd
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_6wide.sh` \
/nfs/home/yanyue/workspace/spec06_cpts/spec_0.8c.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/spec06_0.8coverage.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
10 changes: 10 additions & 0 deletions util/xs_scripts/kmh_v3_ideal.sh
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

0 comments on commit 9e99f64

Please sign in to comment.