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

fix the use of the new config file.

上级 6a31132d
......@@ -73,7 +73,9 @@ class ProfileMode(Mode):
optimizer = predefined_optimizers[optimizer]
self._optimizer = optimizer
def print_summary(self, n_apply_to_print=None, n_ops_to_print=None):
def print_summary(self,
n_apply_to_print=config.config.getint("ProfileMode.n_apply_to_print", None),
n_ops_to_print=config.config.getint("ProfileMode.n_ops_to_print", None)):
""" Print 3 summary that show where the time is spend. The first show an Apply-wise summary, the second show an Op-wise summary, the third show an type-Op-wise summary.
The Apply-wise summary print the timing information for the worst offending Apply nodes. This corresponds to individual Op applications within your graph which take the longest to execute (so if you use dot twice, you will see two entries there).
......@@ -87,9 +89,6 @@ class ProfileMode(Mode):
:param n_ops_to_print: the number of ops to print. Default 20, or n_apply_to_print flag.
"""
n_apply_to_print=config.getint("ProfileMode.n_apply_to_print", n_apply_to_print)
n_ops_to_print=config.getint("ProfileMode.n_ops_to_print", n_ops_to_print)
local_time = self.local_time[0]
compile_time = self.compile_time
apply_time = self.apply_time
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论