提交 31ed90e6 authored 作者: Brandon T. Willard's avatar Brandon T. Willard 提交者: Brandon T. Willard

Fix docstring for _find_bad_optimizations

上级 d03c8431
......@@ -696,8 +696,9 @@ def _lessbroken_deepcopy(a):
def _find_bad_optimizations(order, reasons, r_vals):
"""
Use a simple algorithm to find broken optimizations.
"""Iterate over variables looking for values that don't match the values of the variables they replaced.
This is a sign of a broken optimization.
This algorithm is simple to understand, but sometimes when there's
a problem it identifies the wrong optimization as the culprit.
......@@ -706,9 +707,6 @@ def _find_bad_optimizations(order, reasons, r_vals):
graph).
"""
# iterate over variables looking for values that don't match the
# values of the variables they replaced. This is the sign of a
# broken optimization.
for i, node in enumerate(order):
for new_r in node.outputs:
for reason, r, old_graph_str, new_graph_str in reasons[new_r]:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论