From d453b0dcf72d50501bc59309a971c172ef148e31 Mon Sep 17 00:00:00 2001 From: dzhwinter Date: Thu, 14 Feb 2019 16:02:38 +0800 Subject: [PATCH 1/3] add details. test=develop --- .../paddle/fluid/transpiler/memory_optimization_transpiler.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/paddle/fluid/transpiler/memory_optimization_transpiler.py b/python/paddle/fluid/transpiler/memory_optimization_transpiler.py index 52c1aea288..047e0832bc 100755 --- a/python/paddle/fluid/transpiler/memory_optimization_transpiler.py +++ b/python/paddle/fluid/transpiler/memory_optimization_transpiler.py @@ -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_dtyp are different") + continue if not compare_shape(x_shape, cache_shape, level): continue From 84f067be9405d45436a4326b474f3984ce44d021 Mon Sep 17 00:00:00 2001 From: dzhwinter Date: Thu, 14 Feb 2019 17:15:00 +0800 Subject: [PATCH 2/3] update. test=develop test=develop --- .../paddle/fluid/transpiler/memory_optimization_transpiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/fluid/transpiler/memory_optimization_transpiler.py b/python/paddle/fluid/transpiler/memory_optimization_transpiler.py index 047e0832bc..ee8cde441f 100755 --- a/python/paddle/fluid/transpiler/memory_optimization_transpiler.py +++ b/python/paddle/fluid/transpiler/memory_optimization_transpiler.py @@ -357,7 +357,7 @@ class ControlFlowGraph(object): is_forward).dtype() if x_dtype != cache_dtype: if PRINT_LOG: - print("x_dtype and cache_dtyp are different") + print("x_dtype and cache_dtype are different") continue if not compare_shape(x_shape, cache_shape, level):