MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / convert

Function convert

imperative/python/megengine/tools/graph_info_analyze.py:186–197  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

184
185
186def convert(args):
187 file_process_order = {
188 "graph.json": comp_graph_plotter,
189 "StaticMemoryInfo.json": peak_mem_regist,
190 }
191 g = os.walk(args.input)
192 for path, dir_list, file_list in g:
193 out_path = path.replace(args.input, args.output)
194 writer = SummaryWriterExtend(out_path)
195 for key, value in file_process_order.items():
196 if key in file_list:
197 value(os.path.join(path, key), writer)
198
199
200def main():

Callers 1

mainFunction · 0.70

Calls 5

SummaryWriterExtendClass · 0.90
valueFunction · 0.85
itemsMethod · 0.80
joinMethod · 0.80
replaceMethod · 0.45

Tested by

no test coverage detected