未验证 提交 0936097c 编写于 作者: D dzhwinter 提交者: GitHub

Merge pull request #15714 from dzhwinter/fix/memory_with_dtype

fix optimize with different dtype
......@@ -355,6 +355,10 @@ class ControlFlowGraph(object):
is_forward).dtype()
cache_dtype = self._find_var(block_desc, cache_var,
is_forward).dtype()
if x_dtype != cache_dtype:
if PRINT_LOG:
print("x_dtype and cache_dtype are different")
continue
if not compare_shape(x_shape, cache_shape, level):
continue
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册