From b2eb62320246b1007e7fa4f78595ed89939feae8 Mon Sep 17 00:00:00 2001 From: dzhwinter Date: Tue, 19 Feb 2019 11:16:20 +0800 Subject: [PATCH] cherry-picked changes. test=release/1.3 --- python/paddle/fluid/compiler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/paddle/fluid/compiler.py b/python/paddle/fluid/compiler.py index c9885b43b80..a258ad76cd2 100644 --- a/python/paddle/fluid/compiler.py +++ b/python/paddle/fluid/compiler.py @@ -178,9 +178,9 @@ class CompiledProgram(object): # FIXME(dzhwinter): enable_inplace should be after memory_optimize # if turn on python memory optimize, turn off the inplace_pass. if self._build_strategy.memory_optimize is True: - self._build_strategy.memory_optimize = False if main._is_mem_optimized else True + self._build_strategy.memory_optimize = False if self._program._is_mem_optimized else True if self._build_strategy.enable_inplace is True: - self._build_strategy.enable_inplace = False if main._is_mem_optimized else True + self._build_strategy.enable_inplace = False if self._program._is_mem_optimized else True if self._build_strategy.num_trainers > 1 and trainers_endpoints: assert self._build_strategy.num_trainers == len( -- GitLab