-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
executable file
·65 lines (56 loc) · 1.64 KB
/
run.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
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
#!/bin/bash
configs=(
# cgra_elemadd_simple
# cgra_elemadd_qtree
# cgra_elemadd_btree
# cgra_elemmul_simple
cgra_elemmul_qtree
cgra_elemmul_btree
)
benchmarks=(
160x160_density0.1
# 160x160_density0.2
# bcsstm26
# ch7-6-b1
# mk9-b1
# n4c6-b1
# relat5
# rel5
)
proj_root=$(pwd)
output_root=outputs
# loop through each benchmark
for config in "${configs[@]}"
do
for benchmark in "${benchmarks[@]}"
do
# Setup
echo "[run.sh] ===== Benchmark: ${benchmark}, config: ${config} ====="
output_dir=cfg_${config}_bmark_${benchmark}
output_path=${output_root}/${output_dir}
# Create output directory
rm -rf ${output_path}
mkdir -p ${output_path}
# Run main tiler tool
python tiler_swift/main.py \
-c ./configs/config_${config}.yaml \
-t ./benchmarks/${benchmark} \
-o ${output_path} \
| tee ${output_path}/log_main.log
# Visualize the results
python tiler_swift/visualize.py \
-r ${output_path}/results.yaml \
-t ./benchmarks/${benchmark} \
-o ${output_path}/tiling_visualization.png \
| tee ${output_path}/log_visualize.log
# get the operation type from the config file name
IFS="_" read -ra split_config <<< "${config}"
# Run Comal
cd tests/comal
cargo run \
--bin tiler_swift_mat_${split_config[1]} \
${proj_root}/${output_path}/tiles/tile_pair_paths.toml \
| tee ${proj_root}/${output_path}/log_comal.log
cd ${proj_root}
done
done