fix bug in memory optimization transpiler (#8233)

emailweixu-patch-1
QI JUN 7 years ago committed by GitHub
parent 6c3b78b7cf
commit 931375ffeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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]

Loading…
Cancel
Save