提交 905e42b5 authored 作者: sentient07's avatar sentient07

fixed the error in recurssion

上级 0cf98513
...@@ -52,6 +52,7 @@ def _atexit_print_fn(): ...@@ -52,6 +52,7 @@ def _atexit_print_fn():
destination_file = sys.stdout destination_file = sys.stdout
else: else:
destination_file = open(config.profiling.destination, 'w') destination_file = open(config.profiling.destination, 'w')
# Reverse sort in the order of compile+exec time # Reverse sort in the order of compile+exec time
for ps in sorted(_atexit_print_list, for ps in sorted(_atexit_print_list,
key=lambda a:a.compile_time + a.fct_call_time)[::-1]: key=lambda a:a.compile_time + a.fct_call_time)[::-1]:
......
...@@ -1312,7 +1312,7 @@ class LocalOptGroup(LocalOptimizer): ...@@ -1312,7 +1312,7 @@ class LocalOptGroup(LocalOptimizer):
# Ensuring not the input of graph # Ensuring not the input of graph
assert repl[0].owner assert repl[0].owner
new_node = repl[0].owner new_node = repl[0].owner
apply_mult_opts(new_node, fgraph, True, repl) repl = apply_mult_opts(new_node, fgraph, True, repl)
return repl return repl
node_start = time.time() node_start = time.time()
...@@ -2048,10 +2048,10 @@ class TopoOptimizer(NavigatorOptimizer): ...@@ -2048,10 +2048,10 @@ class TopoOptimizer(NavigatorOptimizer):
print(blanc, " callback_time", callback_time, file=stream) print(blanc, " callback_time", callback_time, file=stream)
if isinstance(lopt, LocalOptGroup): if isinstance(lopt, LocalOptGroup):
lopt.print_profile(stream, (lopt.time_opts, lopt.print_profile(stream, (lopt.time_opts,
lopt.time_nodes, lopt.time_nodes,
lopt.process_count, lopt.process_count,
lopt.applied_true, lopt.applied_true,
lopt.node_created)) lopt.node_created))
def __str__(self): def __str__(self):
return getattr(self, '__name__', return getattr(self, '__name__',
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论