-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain copy.py
26 lines (24 loc) · 1009 Bytes
/
main copy.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
from classes.stages import *
import argparse
parser = argparse.ArgumentParser(description="Setup zigzag-v2 inputs")
parser.add_argument('--workload', metavar='path', required=True, help='module path to workload, e.g. inputs.examples.workload1')
parser.add_argument('--accelerator', metavar='path', required=True, help='module path to the accelerator, e.g. inputs.examples.accelerator1')
args = parser.parse_args()
import logging as _logging
_logging_level = _logging.INFO
_logging_format = '%(asctime)s - %(name)s.%(funcName)s +%(lineno)s - %(levelname)s - %(message)s'
_logging.basicConfig(level=_logging_level,
format=_logging_format)
mainstage = MainStage([
WorkloadAndAcceleratorParserStage,
CompleteSaveStage,
WorkloadStage,
SpatialMappingConversionStage,
TemporalOrderingConversionStage,
CostModelStage
],
accelerator_path=args.accelerator,
workload_path=args.workload,
dump_filename_pattern="outputs_workshop/{datetime}.json"
)
mainstage.run()