-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbenchmark.sh
More file actions
executable file
·71 lines (50 loc) · 2.38 KB
/
Copy pathbenchmark.sh
File metadata and controls
executable file
·71 lines (50 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/usr/bin/env bash
BENCHMARK_DIR=$(pwd)
MEMPOOL_DIR=/scratch/bsc22f8/git/oswaldlo1/mempool
SNITCH_DIR=/scratch/bsc22f8/git/oswaldlo1/snitch
BANSHEE_DIR=$SNITCH_DIR/sw/banshee
### Setup ###
# clean files
# rm -f {multicore,singlecore}/{apps,banshee-results,rtl-results}/{baseline,xpulp}/*
# clean mempool
cd $MEMPOOL_DIR/software
make clean
cd ..
# exit
### Generate test apps ###
echo "Generate test apps"
# without xpulp enabled
config=minpool make XPULPIMG=0 apps
# copy to save location
cp -rf software/bin/* $BENCHMARK_DIR/multicore/apps/baseline
# with xpulp enabled
config=minpool make XPULPIMG=1 apps
# copy to save location
cp -rf software/bin/* $BENCHMARK_DIR/multicore/apps/xpulp
# exit
### Run benchmarks ###
echo "Run benchmarks"
cd $MEMPOOL_DIR/hardware
unset CC && unset CXX
# make clean #&& config=minpool make simcvcs
# without xpulp enabled
cp -rf $BENCHMARK_DIR/multicore/apps/baseline/* $MEMPOOL_DIR/software/bin
app=convolution config=minpool make benchmark | tee $BENCHMARK_DIR/multicore/rtl-results/baseline/convolution
cd $BANSHEE_DIR
SNITCH_LOG=banshee::engine=TRACE cargo run -- --num-cores 16 --num-clusters 1 --configuration config/mempool.yaml \
$MEMPOOL_DIR/software/bin/convolution --latency &> $BENCHMARK_DIR/multicore/banshee-results/baseline/convolution
# exit
# with xpulp enabled
cp -rf $BENCHMARK_DIR/multicore/apps/xpulp/* $MEMPOOL_DIR/software/bin
app=convolution config=minpool make benchmark | tee $BENCHMARK_DIR/multicore/rtl-results/xpulp/convolution
cd $BANSHEE_DIR
SNITCH_LOG=banshee::engine=TRACE cargo run -- --num-cores 16 --num-clusters 1 --configuration config/mempool.yaml \
$MEMPOOL_DIR/software/bin/convolution --latency &> $BENCHMARK_DIR/multicore/banshee-results/xpulp/convolution
### Extract results
grep "[DUMP].*: 0x002 = .*" multicore/rtl-results/xpulp/convolution
grep "TRACE banshee::engine > Core .*: Write CSR Frm = 0x.*" multicore/banshee-results/xpulp/matmul_i32 | sort
grep "TRACE banshee::engine > Core \(.*\): Write CSR Frm = 0x\(.*\)" multicore/banshee-results/xpulp/matmul_i32 | sort | grep -o "[0-9]*"
grep "TRACE banshee::engine > Core \(.*\): Write CSR Frm = 0x\(.*\)" $dir/$file | sort | grep -o "[0-9]*" > $dir/res_$file
# cut only fields 6 and 11; fields separated by " "
# tr changes ":" to ","
grep "TRACE banshee::engine > Core \(.*\): Write CSR Frm = 0x\(.*\)" $dir/$file | sort | cut -d " " -f 6,11 | tr ":" "," > $dir/res_$file