未验证 提交 931375ff 编写于 作者: Q QI JUN 提交者: GitHub

fix bug in memory optimization transpiler (#8233)

上级 6c3b78b7
......@@ -155,6 +155,9 @@ class ControlFlowGraph(object):
for x in defs_can_optimize
]
for x, x_shape in out_pair:
# If x is both in uses and defs, it can not be optimized!
if x in self._uses[i]:
continue
for index, cache_pair in enumerate(self.pool):
cache_var = cache_pair[0]
cache_shape = cache_pair[1]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册