-
Notifications
You must be signed in to change notification settings - Fork 2
/
Taskfile.yml
175 lines (147 loc) · 7.96 KB
/
Taskfile.yml
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# https://taskfile.dev
version: '3'
vars:
GENERATED_BENCHMARK_PATH: ./tasks_output/generated_benchmarks
STRIX_RESULTS_PATH: ./tasks_output/strix
SPOT_MODULAR_RESULTS_PATH: ./tasks_output/spot_modular
DEPSYNT_RESULTS_PATH: ./tasks_output/depsynt
DEPSYNT_MEASURES_RESULTS_PATH: ./tasks_output/depsynt-measures
STRIX_SUMMARY: ./tasks_output/strix.csv
DEPSYNT_SUMMARY: ./tasks_output/depsynt.csv
DEPSYNT_MEASURE_SUMMARY: ./tasks_output/depsynt_measure.csv
SPOT_MODULAR_SUMMARY: ./tasks_output/spotmodular.csv
SYNTHESIS_TIMEOUT: 180m
BENCHMARKS_FAMALIES: "tsl_smart_home_jarvis/extracted-benchmarks,tsl_paper,mux,ltl2dpa,shift"
FIND_DEPENDENCIES_FORMULA_PATH: ./tasks_output/find_deps_formula
FIND_DEPENDENCIES_FORMULA_SUMMARY: ./tasks_output/find_deps_formula.csv
FIND_DEPENDENCIES_PATH: ./tasks_output/find_deps
FIND_DEPENDENCIES_SUMMARY: ./tasks_output/find_deps.csv
FIND_DEPENDENCIES_TIMEOUT: 60m
tasks:
# Synthesis
depsynt:
desc: Run DepSynt tool on the generated benchmarks
summary: |
This task removes the previous results and submits a new job to the cluster.
The job is generated using the `slurm_task_gen.py` script with the args of:
synthesis timeout, benchmarks text files path, the output directory to put the results on, what families of benchmark to run the results on.
cmds:
- mkdir -p {{.DEPSYNT_RESULTS_PATH}}
- rm -f {{.DEPSYNT_RESULTS_PATH}}/*
- rm -f ./submit_depsynt
- chmod +x ./scripts/slurm_task_gen.py
- ./scripts/slurm_task_gen.py --task=depsynt --timeout={{.SYNTHESIS_TIMEOUT}} --benchmarks-path={{.GENERATED_BENCHMARK_PATH}}/text --output-path={{.DEPSYNT_RESULTS_PATH}} --families="{{.BENCHMARKS_FAMALIES}}" > submit_depsynt
- sbatch submit_depsynt
# Synthesis
depsynt:measure:
desc: Run DepSynt tool with extra measures
cmds:
- mkdir -p {{.DEPSYNT_MEASURES_RESULTS_PATH}}
- rm -f {{.DEPSYNT_MEASURES_RESULTS_PATH}}/*
- rm -f ./submit_depsynt_measures
- chmod +x ./scripts/slurm_task_gen.py
- ./scripts/slurm_task_gen.py --task=depsynt_measured --timeout={{.SYNTHESIS_TIMEOUT}} --benchmarks-path={{.GENERATED_BENCHMARK_PATH}}/text --output-path={{.DEPSYNT_MEASURES_RESULTS_PATH}} --families="{{.BENCHMARKS_FAMALIES}}" > submit_depsynt_measures
- sbatch submit_depsynt_measures
depsynt:summary:
cmds:
- rm -f {{.DEPSYNT_SUMMARY}}
- chmod +x ./scripts/results_summarizer.py
- ./scripts/results_summarizer.py --result-path={{.DEPSYNT_RESULTS_PATH}} --benchmarks-path={{.GENERATED_BENCHMARK_PATH}}/text --summary-output={{.DEPSYNT_SUMMARY}} --tool=depsynt
depsynt:measure:summary:
cmds:
- rm -f {{.DEPSYNT_MEASURE_SUMMARY}}
- chmod +x ./scripts/results_summarizer.py
- ./scripts/results_summarizer.py --result-path={{.DEPSYNT_MEASURES_RESULTS_PATH}} --benchmarks-path={{.GENERATED_BENCHMARK_PATH}}/text --summary-output={{.DEPSYNT_MEASURE_SUMMARY}} --tool=depsynt
spot_modular:
- mkdir -p {{.SPOT_MODULAR_RESULTS_PATH}}
- rm -f {{.SPOT_MODULAR_RESULTS_PATH}}/*
- rm -f ./submit_spot_modular
- chmod +x ./scripts/slurm_task_gen.py
- ./scripts/slurm_task_gen.py --task=spotmodular --timeout={{.SYNTHESIS_TIMEOUT}} --benchmarks-path={{.GENERATED_BENCHMARK_PATH}}/text --output-path={{.SPOT_MODULAR_RESULTS_PATH}} --families="{{.BENCHMARKS_FAMALIES}}" > submit_spot_modular
- sbatch submit_spot_modular
spot_modular:summary:
cmds:
- rm -f {{.SPOT_MODULAR_SUMMARY}}
- chmod +x ./scripts/results_summarizer.py
- ./scripts/results_summarizer.py --result-path={{.SPOT_MODULAR_RESULTS_PATH}} --benchmarks-path={{.GENERATED_BENCHMARK_PATH}}/text --summary-output={{.SPOT_MODULAR_SUMMARY}} --tool=depsynt
cactus:
desc: Generate Cactus Plot from the results of the synthesis
cmds:
- python -m scripts.generate_cactus
strix:
cmds:
- mkdir -p {{.STRIX_RESULTS_PATH}}
- rm -f {{.STRIX_RESULTS_PATH}}/*
- rm -f ./submit_strix
- chmod +x ./scripts/slurm_task_gen.py
- ./scripts/slurm_task_gen.py --task=strix --timeout={{.SYNTHESIS_TIMEOUT}} --benchmarks-path={{.GENERATED_BENCHMARK_PATH}}/text --output-path={{.STRIX_RESULTS_PATH}} --families="{{.BENCHMARKS_FAMALIES}}" > submit_strix
- sbatch submit_strix
strix:summary:
cmds:
- rm -f {{.STRIX_SUMMARY}}
- chmod +x ./scripts/results_summarizer.py
- ./scripts/results_summarizer.py --result-path={{.STRIX_RESULTS_PATH}} --benchmarks-path={{.GENERATED_BENCHMARK_PATH}}/text --summary-output={{.STRIX_SUMMARY}} --tool=strix
spot:summary: # Example: task spot:summary SPOT_RESULTS_PATH=./tasks_output/spot-lar SPOT_SUMMARY=./tasks_output/spot-lar.csv
cmds:
- rm -f {{.SPOT_SUMMARY}}
- chmod +x ./scripts/results_summarizer.py
- ./scripts/results_summarizer.py --result-path={{.SPOT_RESULTS_PATH}} --benchmarks-path={{.GENERATED_BENCHMARK_PATH}}/text --summary-output={{.SPOT_SUMMARY}} --tool=strix
# Find Dependencies
find_dependencies:
cmds:
- mkdir -p {{.FIND_DEPENDENCIES_PATH}}
- rm -f {{.FIND_DEPENDENCIES_PATH}}/*
- rm -f ./submit_find_deps
- chmod +x ./scripts/slurm_task_gen.py
- ./scripts/slurm_task_gen.py --task=find_deps --timeout={{.FIND_DEPENDENCIES_TIMEOUT}} --benchmarks-path={{.GENERATED_BENCHMARK_PATH}}/text --output-path={{.FIND_DEPENDENCIES_PATH}} > submit_find_deps
- sbatch submit_find_deps
find_dependencies:summary:
- rm -f {{.FIND_DEPENDENCIES_SUMMARY}}
- chmod +x ./scripts/results_summarizer.py
- ./scripts/results_summarizer.py --result-path={{.FIND_DEPENDENCIES_PATH}} --benchmarks-path={{.GENERATED_BENCHMARK_PATH}}/text --summary-output={{.FIND_DEPENDENCIES_SUMMARY}} --tool=find_deps
find_dependencies_formula:
cmds:
- mkdir -p {{.FIND_DEPENDENCIES_FORMULA_PATH}}
- rm -f {{.FIND_DEPENDENCIES_FORMULA_PATH}}/*
- rm -f ./submit_find_deps
- chmod +x ./scripts/slurm_task_gen.py
- ./scripts/slurm_task_gen.py --task=find_deps_formula --timeout={{.FIND_DEPENDENCIES_TIMEOUT}} --benchmarks-path={{.GENERATED_BENCHMARK_PATH}}/text --output-path={{.FIND_DEPENDENCIES_FORMULA_PATH}} > submit_find_deps
- sbatch submit_find_deps
find_dependencies_formula:summary:
- rm -f {{.FIND_DEPENDENCIES_FORMULA_SUMMARY}}
- chmod +x ./scripts/results_summarizer.py
- ./scripts/results_summarizer.py --result-path={{.FIND_DEPENDENCIES_FORMULA_PATH}} --benchmarks-path={{.GENERATED_BENCHMARK_PATH}}/text --summary-output={{.FIND_DEPENDENCIES_FORMULA_SUMMARY}} --tool=find_deps
# Generate benchmarks
generate_benchmarks:
cmds:
- task: generate_benchmarks:clean
- task: generate_benchmarks:tlsf
- task: generate_benchmarks:text
generate_benchmarks:tlsf:
internal: true
cmds:
- mkdir -p {{.GENERATED_BENCHMARK_PATH}}/tlsf
- chmod +x ./scripts/benchmarks/tlsf/selectBenchmarks.py
- ./scripts/benchmarks/tlsf/selectBenchmarks.py ./scripts/benchmarks/tlsf {{.GENERATED_BENCHMARK_PATH}}/tlsf --savestruct
generate_benchmarks:clean:
internal: true
cmds:
- rm -rf {{.GENERATED_BENCHMARK_PATH}}
- mkdir -p {{.GENERATED_BENCHMARK_PATH}}
generate_benchmarks:text:
internal: true
deps: [generate_benchmarks:tlsf]
cmds:
- rm -rf {{.GENERATED_BENCHMARK_PATH}}/text
- mkdir -p {{.GENERATED_BENCHMARK_PATH}}/text
- chmod +x ./scripts/tlsf_to_text.py
- ./scripts/tlsf_to_text.py {{.GENERATED_BENCHMARK_PATH}}/tlsf {{.GENERATED_BENCHMARK_PATH}}/text
clean_skipped_synthesis: # Example: task clean_skipped_synthesis CLEAN_PATH=./tasks_output/depsynt
desc: Remove the skipped synthesis results
summary: |
Benchmarks may be skipped since it wasn't defined in the families of benchmarks to run on.
The script `remove_skipped_synt.sh` removes the results of the synthesis that were skipped.
The script takes as an argument the path to the results directory.
cmds:
- chmod +x ./scripts/remove_skipped_synt.sh
- ./scripts/remove_skipped_synt.sh {{.CLEAN_PATH}}