提交 61a00c1c authored 作者: Frederic's avatar Frederic

Hide callbacks detail if they are fast.

上级 bf9c924d
...@@ -658,10 +658,11 @@ class MergeOptimizer(Optimizer): ...@@ -658,10 +658,11 @@ class MergeOptimizer(Optimizer):
print >> stream, blanc, " replace_time", replace_time print >> stream, blanc, " replace_time", replace_time
print >> stream, blanc, " validate_time", validate_time print >> stream, blanc, " validate_time", validate_time
print >> stream, blanc, " callback_time", callback_time print >> stream, blanc, " callback_time", callback_time
print >> stream, blanc, " callbacks_time" if callback_time > 1:
for i in sorted(callbacks_time.iteritems(), key=lambda a: a[1]): print >> stream, blanc, " callbacks_time"
if i[1] > 0: for i in sorted(callbacks_time.iteritems(), key=lambda a: a[1]):
print i if i[1] > 0:
print i
print >> stream, blanc, " nb_merged", nb_merged print >> stream, blanc, " nb_merged", nb_merged
print >> stream, blanc, " nb_constant", nb_constant print >> stream, blanc, " nb_constant", nb_constant
......
...@@ -1581,10 +1581,11 @@ class GemmOptimizer(Optimizer): ...@@ -1581,10 +1581,11 @@ class GemmOptimizer(Optimizer):
print >> stream, blanc, " time_toposort", prof[9] print >> stream, blanc, " time_toposort", prof[9]
print >> stream, blanc, " validate_time", prof[10] print >> stream, blanc, " validate_time", prof[10]
print >> stream, blanc, " callback_time", prof[11] print >> stream, blanc, " callback_time", prof[11]
print >> stream, blanc, " callbacks_time" if prof[11] > 1:
for i in sorted(prof[12].iteritems(), key=lambda a: a[1]): print >> stream, blanc, " callbacks_time"
if i[1] > 0: for i in sorted(prof[12].iteritems(), key=lambda a: a[1]):
print i if i[1] > 0:
print i
class Dot22(GemmRelated): class Dot22(GemmRelated):
......
...@@ -4941,10 +4941,11 @@ class FusionOptimizer(Optimizer): ...@@ -4941,10 +4941,11 @@ class FusionOptimizer(Optimizer):
print >> stream, blanc, " nb_inconsistency_replace", prof[3] print >> stream, blanc, " nb_inconsistency_replace", prof[3]
print >> stream, blanc, " validate_time", prof[4] print >> stream, blanc, " validate_time", prof[4]
print >> stream, blanc, " callback_time", prof[5] print >> stream, blanc, " callback_time", prof[5]
print >> stream, blanc, " callbacks_time" if prof[5] > 1:
for i in sorted(prof[6].iteritems(), key=lambda a: a[1]): print >> stream, blanc, " callbacks_time"
if i[1] > 0: for i in sorted(prof[6].iteritems(), key=lambda a: a[1]):
print i if i[1] > 0:
print i
print >> stream, blanc, " time_toposort", prof[7] print >> stream, blanc, " time_toposort", prof[7]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论