提交 b629d1cf authored 作者: Frederic Bastien's avatar Frederic Bastien

better printing of scan profiling.

上级 499334e6
...@@ -1979,7 +1979,7 @@ def profile_printer(fct_name, compile_time, fct_call_time, fct_call, ...@@ -1979,7 +1979,7 @@ def profile_printer(fct_name, compile_time, fct_call_time, fct_call,
if any([isinstance(node.op, (Scan, ScanGrad)) for (_,node) in apply_time.keys()]): if any([isinstance(node.op, (Scan, ScanGrad)) for (_,node) in apply_time.keys()]):
print print
print 'Scan overhead:' print 'Scan overhead:'
print '<Scan op time(s)> <sub scan fct time(s)> <sub scan op time(s)> <sub scan fct time(% scan op time)> <sub scan op time(% scan op time)> <node>' print '<Scan op time(s)> <sub scan fct time(s)> <sub scan op time(s)> <sub scan fct time/scan op time(%)> <sub scan op time/scan op time(%)> <node>'
total_super_scan_time = 0 total_super_scan_time = 0
total_scan_fct_time = 0 total_scan_fct_time = 0
total_scan_op_time = 0 total_scan_op_time = 0
...@@ -1990,8 +1990,8 @@ def profile_printer(fct_name, compile_time, fct_call_time, fct_call, ...@@ -1990,8 +1990,8 @@ def profile_printer(fct_name, compile_time, fct_call_time, fct_call,
total_super_scan_time += v total_super_scan_time += v
total_scan_fct_time += scan_fct_time total_scan_fct_time += scan_fct_time
total_scan_op_time += scan_op_time total_scan_op_time += scan_op_time
print ' %5.1fs %5.1fs %5.1fs %5.1f%% %5.1f%%'%( print ' %5.1es %5.1es %5.1es %5.1f%% %5.1f%%'%(
v, scan_fct_time, scan_op_time, scan_fct_time/v*100, v, scan_fct_time, scan_op_time, scan_fct_time/v*100,
scan_op_time/v*100), node scan_op_time/v*100), node
print ' total %5.1fs %5.1fs %5.1fs %5.1f%% %5.1f%%'%( print ' total %5.1es %5.1es %5.1es %5.1f%% %5.1f%%'%(
total_super_scan_time, total_scan_fct_time, total_scan_op_time, total_scan_fct_time/total_super_scan_time*100, total_scan_op_time/total_super_scan_time*100) total_super_scan_time, total_scan_fct_time, total_scan_op_time, total_scan_fct_time/total_super_scan_time*100, total_scan_op_time/total_super_scan_time*100)
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论