-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrun_search.py
53 lines (47 loc) · 1.84 KB
/
run_search.py
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
import argparse
import pathlib
from dataset import DATASET_ROOT_PATH
from dataset.dse import mapping_driven_hw_search
from dataset.common import utils, logger
def construct_argparser():
parser = argparse.ArgumentParser(description='Run Configuration')
parser.add_argument('-o',
'--output_dir',
type=str,
help='Output Folder',
default='output_dir',
)
parser.add_argument('--dataset_path',
type=str,
help='Dataset Path',
required=True,
)
parser.add_argument('-wl',
'--workload',
type=str,
help='<Required> Name of workload directory.',
required=True,
)
parser.add_argument('--predictor',
type=str,
help='analytical, dnn, or both',
default='analytical',
)
parser.add_argument('--plot_only',
action='store_true',
help='only plotting',
)
parser.add_argument('--ordering',
type=str,
help='ordering',
default='shuffle',
)
return parser
if __name__ == "__main__":
parser = construct_argparser()
args = parser.parse_args()
output_dir = args.output_dir
output_dir = f'{output_dir}'
output_dir = pathlib.Path(output_dir).resolve()
output_dir.mkdir(parents=True, exist_ok=True)
mapping_driven_hw_search.search_network("gemmini", args.output_dir, args.workload, args.dataset_path, args.predictor, args.plot_only, args.ordering)