提交 82abb2a9 authored 作者: Reyhane Askari's avatar Reyhane Askari

minor fix

上级 dd349d20
...@@ -1477,18 +1477,15 @@ AddConfigVar('compile.wait', ...@@ -1477,18 +1477,15 @@ AddConfigVar('compile.wait',
"""Time to wait before retrying to aquire the compile lock.""", """Time to wait before retrying to aquire the compile lock.""",
IntParam(5, lambda i: i > 0, allow_override=False), IntParam(5, lambda i: i > 0, allow_override=False),
in_c_key=False) in_c_key=False)
"""
If cycle_detection is set to regular, most inplaces are allowed,
but it is slower. If cycle_detection is set to faster,
less inplaces are allowed, but it makes the compilation faster.
The interaction of which one give the lower peak memory usage is complicated and
not predictable, so if you are close to the peak memory usage, triyng both
could give you a small gain.
"""
AddConfigVar('cycle_detection', AddConfigVar('cycle_detection',
"""If true it disables the cycle detection in graph. "If cycle_detection is set to regular, most inplaces are allowed,"
""", "but it is slower. If cycle_detection is set to faster, less inplaces"
"are allowed, but it makes the compilation faster."
"The interaction of which one give the lower peak memory usage is"
"complicated and not predictable, so if you are close to the peak"
"memory usage, triyng both could give you a small gain. ",
EnumStr('regular', 'fast'), EnumStr('regular', 'fast'),
in_c_key=False) in_c_key=False)
......
...@@ -675,7 +675,7 @@ class FunctionGraph(utils.object2): ...@@ -675,7 +675,7 @@ class FunctionGraph(utils.object2):
" will be non-deterministic.") " will be non-deterministic.")
if len(all_orderings) == 1: if len(all_orderings) == 1:
# If there is only 1 ordering, we reuse it directly. # If there is only 1 ordering, we reuse it directly.
return all_orderings[0] return all_orderings[0].copy()
else: else:
# If there is more than 1 ordering, combine them. # If there is more than 1 ordering, combine them.
ords = OrderedDict() ords = OrderedDict()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论