-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathconvolutions.sh
executable file
·33 lines (25 loc) · 1.29 KB
/
convolutions.sh
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
#!/bin/bash
# Measure layer by layer convolution performance for resnet18 on rasp3b
repeats=10
log_file=scripts/rasp3b.log
if [ ! -d data ]; then
mkdir -p data;
fi
python3 scripts/convolutions_quantized.py --repeats=$repeats --weight_bits=1 \
--activation_bits=1 --log_file=${log_file}
python3 scripts/convolutions_quantized.py --repeats=$repeats --weight_bits=1 \
--activation_bits=2 --log_file=${log_file}
python3 scripts/convolutions_quantized.py --repeats=$repeats --weight_bits=2 \
--activation_bits=2 --log_file=${log_file}
# Extra convolutions for ablation - just need to benchmark the first convolution
python3 scripts/convolutions_quantized.py --repeats=$repeats --weight_bits=2 \
--activation_bits=1 --log_file=${log_file} --first
python3 scripts/convolutions_quantized.py --repeats=$repeats --weight_bits=3 \
--activation_bits=1 --log_file=${log_file} --first
python3 scripts/convolutions_quantized.py --repeats=$repeats --weight_bits=1 \
--activation_bits=3 --log_file=${log_file} --first
# A2W1 single threaded
python3 scripts/convolutions_quantized.py --repeats=$repeats --weight_bits=1 \
--activation_bits=2 --log_file=scripts/rasp3b_single.log --single
# Floating point
python3 scripts/convolutions_fp.py --repeats=$repeats