MCPcopy Create free account
hub / github.com/MegEngine/MegCC / run_local

Method run_local

benchmark/python/src/benchmark.py:76–100  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

74 self.benchmark_build_dir)
75
76 def run_local(self):
77 if not os.path.exists(self.output_dir.local_path) or os.path.isfile(
78 self.output_dir.local_path):
79 os.makedirs(self.output_dir.local_path)
80 logfile = open(
81 "{}/{}-{}-{}-{}-log-local.txt".format(
82 self.output_dir.local_path,
83 self.benchmark_framework,
84 self.benchmark_arch,
85 self.model.name,
86 self.log_level,
87 ),
88 "w",
89 )
90 run_options = ""
91 if self.log_level == 0:
92 run_options += " --profile"
93 if self.benchmark_framework == "mge":
94 run_options += " --mge"
95 cmd = "{} {} {}".format(self.benchmark_exec_func, self.model.path,
96 run_options)
97 subprocess.check_call(cmd,
98 shell=True,
99 stdout=logfile,
100 stderr=subprocess.STDOUT)

Callers 1

set_config_and_runFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected