Skip to content

Commit 43c92dc

Browse files
committed
rerun windows ci. test=develop
1 parent 8b97a3a commit 43c92dc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

python/paddle/fluid/parallel_executor.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ def __init__(self,
135135
# step3: init build_strategy
136136
if build_strategy is None:
137137
build_strategy = BuildStrategy()
138-
build_strategy.enable_inplace = False if main._is_optimized else True
139138
build_strategy.num_trainers = num_trainers
140139
build_strategy.trainer_id = trainer_id
141140
# FIXME(zcd): is_distribution_ is a temporary field, because in pserver mode,
@@ -147,6 +146,9 @@ def __init__(self,
147146
# step4: get main_program, scope, local_scopes
148147
main = main_program if main_program \
149148
else framework.default_main_program()
149+
# FIXME(dzhwinter): enable_inplace should be after memory_optimize
150+
# if turn on python memory optimize, turn off the inplace_pass.
151+
build_strategy.enable_inplace = False if main._is_optimized else True
150152
scope = scope if scope is not None else executor.global_scope()
151153

152154
if share_vars_from and not isinstance(share_vars_from,

0 commit comments

Comments
 (0)