Skip to content

Commit

Permalink
Exp scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
yycdavid committed Oct 6, 2020
1 parent b349f7b commit f19b0e3
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 34 deletions.
6 changes: 3 additions & 3 deletions analysis/stats.py
Expand Up @@ -77,9 +77,9 @@ def speedup_bar(benchmark):

taso_mean_time = np.mean(taso_runtimes)

print("{}: orig {} taso {}".format(benchmark, orig_mean, taso_mean_time))
print("{}: orig {} taso {} egg {}".format(benchmark, orig_mean, taso_mean_time, np.mean(egg_runtimes)))

# Plot bar and save
'''# Plot bar and save
width = 0.8
x_locs = [0, 1]
x_locs = [a + width/2 for a in x_locs]
Expand Down Expand Up @@ -107,7 +107,7 @@ def speedup_bar(benchmark):
figlegend = plt.figure(figsize=(3.0,0.5))
figlegend.legend([bar_0, bar_1], ("TASO", "Tensat"), 'center', ncol=2, fancybox=True, shadow=True, prop={'size': 14})
figlegend.savefig("legend.pdf")
plt.close()
plt.close()'''

def speedup_bar_result(benchmark):
# Read in results
Expand Down
17 changes: 11 additions & 6 deletions efficient_vs_vanilla.sh 100644 → 100755
@@ -1,11 +1,16 @@
node_limit=50000
time_limit=3000
time_limit=3600
ilp_time_sec=3600

model=bert
models=(
nasrnn
nasneta
)

for iter_multi in 1 2 3
do
cargo run --release -- -r converted.txt -t converted_multi.txt -u -s none --n_iter $iter_multi --no_order --ilp_time_sec $ilp_time_sec --no_cycle --iter_multi $iter_multi --n_sec $time_limit --n_nodes $node_limit --all_weight_only -e ilp -d $model -o tmp/"$model"_eff_"$iter_multi"_stats.txt
cargo run --release -- -r converted.txt -t converted_multi.txt -u -s none --n_iter $iter_multi --no_order --ilp_time_sec $ilp_time_sec --no_cycle --iter_multi $iter_multi --n_sec $time_limit --n_nodes $node_limit --all_weight_only -e ilp -d $model -o tmp/"$model"_vanilla_"$iter_multi"_stats.txt --filter_before
for model in "${models[@]}"; do
for iter_multi in 1 2
do
cargo run --release -- -r converted.txt -t converted_multi.txt -u -s none --n_iter $iter_multi --no_order --ilp_time_sec $ilp_time_sec --no_cycle --iter_multi $iter_multi --n_sec $time_limit --n_nodes $node_limit --all_weight_only -e ilp -d $model -o tmp/"$model"_eff_"$iter_multi"_stats.txt --saturation_only
cargo run --release -- -r converted.txt -t converted_multi.txt -u -s none --n_iter $iter_multi --no_order --ilp_time_sec $ilp_time_sec --no_cycle --iter_multi $iter_multi --n_sec $time_limit --n_nodes $node_limit --all_weight_only -e ilp -d $model -o tmp/"$model"_vanilla_"$iter_multi"_stats.txt --filter_before --saturation_only
done
done
14 changes: 14 additions & 0 deletions exp_to_run.sh
@@ -0,0 +1,14 @@
node_limit=50000
iter_limit=15
time_limit=3600
iter_multi=2
ilp_time_sec=3600

model=bert

for iter_multi in 3
do
cargo run --release -- -r converted.txt -t converted_multi.txt -u -s none --n_iter $iter_multi --no_order --ilp_time_sec $ilp_time_sec --no_cycle --iter_multi $iter_multi --n_sec $time_limit --n_nodes $node_limit --all_weight_only -e ilp -d $model -o tmp/"$model"_vanilla_"$iter_multi"_stats.txt --filter_before --saturation_only
done

cargo run --release -- -r converted.txt -t converted_multi.txt -u -s none --n_iter 3 --no_order --ilp_time_sec 3600 --no_cycle --iter_multi 3 --n_sec 3600 --n_nodes 50000 --all_weight_only -e ilp -d bert -o tmp/bert_vanilla_3_stats.txt --filter_before --saturation_only
7 changes: 3 additions & 4 deletions greedy_vs_ilp.sh 100644 → 100755
Expand Up @@ -5,11 +5,10 @@ iter_multi=1
ilp_time_sec=3600

models=(
bert
nasrnn
nasneta
)

for model in "${models[@]}"; do
cargo run --release -- -r converted.txt -t converted_multi.txt -u -s none --n_iter $iter_limi --iter_multi $iter_multi --n_sec $time_limit --n_nodes $node_limit --all_weight_only -e greedy -d $model -o tmp/"$model"_greedy_"$iter_multi"_stats.txt
cargo run --release -- -r converted.txt -t converted_multi.txt -u -s none --n_iter $iter_limit --ilp_time_sec $ilp_time_sec --iter_multi $iter_multi --n_sec $time_limit --n_nodes $node_limit --all_weight_only -e ilp -d $model -o tmp/"$model"_ilp_real_"$iter_multi"_stats.txt
cargo run --release -- -r converted.txt -t converted_multi.txt -u -s none --n_iter $iter_limit --iter_multi $iter_multi --n_sec $time_limit --n_nodes $node_limit --all_weight_only -e greedy -d $model -o tmp/"$model"_greedy_"$iter_multi"_stats.txt
#cargo run --release -- -r converted.txt -t converted_multi.txt -u -s none --n_iter $iter_limit --ilp_time_sec $ilp_time_sec --iter_multi $iter_multi --n_sec $time_limit --n_nodes $node_limit --all_weight_only -e ilp -d $model -o tmp/"$model"_ilp_real_"$iter_multi"_stats.txt
done
22 changes: 14 additions & 8 deletions real_vs_int.sh
Expand Up @@ -4,13 +4,19 @@ time_limit=3000
iter_multi=1
ilp_time_sec=3600

model=bert
cargo run --release -- -r converted.txt -t converted_multi.txt -u -s none --n_iter $iter_limit --ilp_time_sec $ilp_time_sec --iter_multi $iter_multi --n_sec $time_limit --n_nodes $node_limit --all_weight_only -e ilp -d $model -o tmp/"$model"_ilp_real_"$iter_multi"_stats.txt
models=(
nasrnn
nasneta
inceptionv3
resnext50
bert
)

cargo run --release -- -r converted.txt -t converted_multi.txt -u -s none --n_iter $iter_limit --ilp_time_sec $ilp_time_sec --iter_multi $iter_multi --n_sec $time_limit --n_nodes $node_limit --all_weight_only -e ilp -d $model -o tmp/"$model"_ilp_int_"$iter_multi"_stats.txt --order_var_int
for model in "${models[@]}"; do
for iter_multi in 1 2
do
cargo run --release -- -r converted.txt -t converted_multi.txt -u -s none --n_iter $iter_limit --ilp_time_sec $ilp_time_sec --iter_multi $iter_multi --n_sec $time_limit --n_nodes $node_limit --all_weight_only -e ilp -d $model -o tmp/"$model"_ilp_real_"$iter_multi"_stats.txt

iter_multi=2

cargo run --release -- -r converted.txt -t converted_multi.txt -u -s none --n_iter $iter_limit --ilp_time_sec $ilp_time_sec --iter_multi $iter_multi --n_sec $time_limit --n_nodes $node_limit --all_weight_only -e ilp -d $model -o tmp/"$model"_ilp_real_"$iter_multi"_stats.txt

cargo run --release -- -r converted.txt -t converted_multi.txt -u -s none --n_iter $iter_limit --ilp_time_sec $ilp_time_sec --iter_multi $iter_multi --n_sec $time_limit --n_nodes $node_limit --all_weight_only -e ilp -d $model -o tmp/"$model"_ilp_int_"$iter_multi"_stats.txt --order_var_int
cargo run --release -- -r converted.txt -t converted_multi.txt -u -s none --n_iter $iter_limit --ilp_time_sec $ilp_time_sec --iter_multi $iter_multi --n_sec $time_limit --n_nodes $node_limit --all_weight_only -e ilp -d $model -o tmp/"$model"_ilp_int_"$iter_multi"_stats.txt --order_var_int
done
done
16 changes: 3 additions & 13 deletions test_exp.sh
@@ -1,19 +1,9 @@
num_passes=1
node_limit=50000
iter_limit=15
time_limit=3000
iter_multi=3
iter_multi=2
ilp_time_sec=3600

models=(
#inceptionv3
#resnext50
nasrnn
nasneta
)
model=bert

for model in "${models[@]}"; do
for pass in $(seq 0 $(expr $num_passes - 1)); do
cargo run --release -- -r converted.txt -t converted_multi.txt -u -s none --n_iter $iter_limit --no_order --ilp_time_sec $ilp_time_sec --no_cycle --iter_multi $iter_multi --n_sec $time_limit --n_nodes $node_limit --all_weight_only -e ilp -d $model -o tmp/"$model"_"$iter_multi"_stats.txt --saturation_only # -x tmp/"$model"_optimized.model
done
done
cargo run --release -- -r converted.txt -t converted_multi.txt -u -s none --n_iter $iter_limit --no_order --ilp_time_sec $ilp_time_sec --no_cycle --iter_multi $iter_multi --n_sec $time_limit --n_nodes $node_limit --all_weight_only -e ilp -d $model -o tmp/"$model"_"$iter_multi"_stats.txt

0 comments on commit f19b0e3

Please sign in to comment.