提交 b7db88ac authored 作者: Frederic's avatar Frederic

Remove the use of the deprecated string PROFILE_MODE.

And a few cases of DEBUG_MODE, not all of them.
上级 1c75e3f0
......@@ -1266,9 +1266,9 @@ def orig_function(inputs, outputs, mode=None, accept_inplace=False,
- FAST_COMPILE (minimal optimization)
- PROFILE_MODE: allow to print a profile mode with mode.print_summary
- ProfileMode: allow to print a profile mode with mode.print_summary
- DEBUG_MODE: verify many internal conditions that are normally assumed
- DebugMode: verify many internal conditions that are normally assumed
(slow)
:param accept_inplace: True iff the graph can contain inplace operations
......
......@@ -626,17 +626,17 @@ prof_mode_instance_to_print = [predefined_modes["PROFILE_MODE"]]
def atexit_print_default_profile_mode():
"""Print the summary of the predefined mode PROFILE_MODE if used.
"""Print the summary of the predefined mode ProfileMode if used.
This all to have the summary printed at exit when
config.mode=PROFILE_MODE
config.mode=ProfileMode
"""
for prof_mode in prof_mode_instance_to_print:
if prof_mode.local_time > 0:
prof_mode.print_summary()
#Register atexit_print_default_profile_mode to have the summary of the
#predefined mode PROFILE_MODE if it is used printed when the program terminate.
#predefined mode ProfileMode if it is used printed when the program terminate.
atexit.register(atexit_print_default_profile_mode)
......
......@@ -17,7 +17,7 @@ class T_bunch_of_modes(unittest.TestCase):
linker_classes_involved = []
predef_modes = ['FAST_COMPILE', 'FAST_RUN', 'DEBUG_MODE']
# Use a new instance of ProfileMode instead of 'PROFILE_MODE' to
# Use a new instance of ProfileMode instead of 'ProfileMode' to
# avoid printing a profile mode summary in nose output
predef_modes.append(ProfileMode())
......@@ -42,7 +42,7 @@ class T_bunch_of_modes(unittest.TestCase):
# there should be
# - VM_Linker
# - OpWiseCLinker (FAST_RUN)
# - WrapLinker (PROFILE_MODE)
# - WrapLinker ("ProfileMode")
# - PerformLinker (FAST_COMPILE)
# - DebugMode's Linker (DEBUG_MODE)
assert 5 == len(set(linker_classes_involved))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论