-
Notifications
You must be signed in to change notification settings - Fork 31
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 valgrind check for ideal config
use coremark to run valgrind Change-Id: I42770e1121f0149ac57d397600b9de56fc48608d
- Loading branch information
1 parent
851b820
commit 49504c2
Showing
2 changed files
with
44 additions
and
19 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 |
---|---|---|
@@ -1,32 +1,33 @@ | ||
set -x | ||
|
||
gem5_home=$(pwd) | ||
gcpt_restore_path=/nfs/home/share/gem5_shared_tools/normal-gcb-restorer.bin | ||
ref_so_path=/nfs-nvme/home/share/zhenhao/ref-h/build/riscv64-nemu-interpreter-so | ||
test_cpt=/nfs/home/share/jiaxiaoyu/simpoint_checkpoint_archive/spec06_rv64gcb_O3_20m_gcc12.2.0-intFpcOff-jeMalloc/checkpoint-0-0-0/GemsFDTD/30385/_30385_0.268180_.gz | ||
ref_so_path=/nfs/home/share/gem5_ci/ref/normal/riscv64-nemu-interpreter-so | ||
export GCBV_REF_SO=$ref_so_path | ||
|
||
export NEMU_HOME=$ref_so_path # dummy | ||
raw_cpt=/nfs/home/share/gem5_ci/checkpoints/coremark-riscv64-xs.bin | ||
# ideal config, $1 means ideal-kmhv3 | ||
IDEAL_CONFIG="" | ||
if [ "$1" ]; then | ||
IDEAL_CONFIG="--ideal-kmhv3" | ||
fi | ||
echo "IDEAL_CONFIG: $IDEAL_CONFIG" | ||
|
||
mkdir -p $gem5_home/valgrind-test | ||
cd $gem5_home/valgrind-test | ||
|
||
valgrind -s --track-origins=yes --log-file=valgrind-out.txt --error-limit=no \ | ||
--suppressions=$gem5_home/util/valgrind-suppressions \ | ||
$gem5_home/build/RISCV/gem5.debug $gem5_home/configs/example/fs.py \ | ||
--xiangshan-system --cpu-type=DerivO3CPU --mem-size=8GB --caches --cacheline_size=64 \ | ||
--l1i_size=64kB --l1i_assoc=8 --l1d_size=64kB --l1d_assoc=8 \ | ||
--l1d-hwp-type=XSCompositePrefetcher --short-stride-thres=0 \ | ||
--l2cache --l2_size=1MB --l2_assoc=8 \ | ||
--l3cache --l3_size=16MB --l3_assoc=16 \ | ||
--l1-to-l2-pf-hint --l2-hwp-type=CompositeWithWorkerPrefetcher \ | ||
--l2-to-l3-pf-hint --l3-hwp-type=WorkerPrefetcher \ | ||
--mem-type=DRAMsim3 \ | ||
--dramsim3-ini=$gem5_home/ext/dramsim3/xiangshan_configs/xiangshan_DDR4_8Gb_x8_3200_2ch.ini \ | ||
--bp-type=DecoupledBPUWithFTB --enable-loop-predictor \ | ||
--enable-difftest --difftest-ref-so=$ref_so_path \ | ||
--generic-rv-cpt=$test_cpt \ | ||
--gcpt-restorer=$gcpt_restore_path \ | ||
--warmup-insts-no-switch=40000 --maxinsts=80000 | ||
$gem5_home/build/RISCV/gem5.debug \ | ||
$gem5_home/configs/example/xiangshan.py \ | ||
$IDEAL_CONFIG \ | ||
--raw-cpt \ | ||
--generic-rv-cpt=$raw_cpt | ||
|
||
# if $? != 0, exit | ||
if [ $? -ne 0 ]; then | ||
echo "Valgrind test failed" | ||
exit 1 | ||
fi | ||
|
||
python3 $gem5_home/util/memory_check/check-memory-error.py $gem5_home/valgrind-test/valgrind-out.txt | ||
|