提交 c84d102d authored 作者: James Bergstra's avatar James Bergstra

debugmode - fixed logic error in TODO comment

上级 19271ea9
...@@ -1098,7 +1098,14 @@ class _Linker(gof.link.LocalLinker): ...@@ -1098,7 +1098,14 @@ class _Linker(gof.link.LocalLinker):
clobber = True clobber = True
if thunk_py: if thunk_py:
for r in node.inputs: for r in node.inputs:
# TODO: we only need to overwrite the non-destroyed inputs # if thunk_py ran, and we still got this far,
# it means that the destroy_map of the Op (and view_map) are
# accurate
# so we can assume that inputs not marked as destroyed have in
# fact not been destroyed.
# Therefore... we only need to overwrite inputs that *have*
# been marked as destroyed.
# TODO: only overwrite the destroyed inputs
# print >> sys.stderr, i, "DEBUGMODE replacing input", r # print >> sys.stderr, i, "DEBUGMODE replacing input", r
storage_map[r][0] = _lessbroken_deepcopy(r_vals[r]) storage_map[r][0] = _lessbroken_deepcopy(r_vals[r])
clobber = False clobber = False
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论