Remove compile from PE (#19080)

* remove compile from PE
test=develop
padding_in_crf
chengduo 6 years ago committed by GitHub
parent 88f111f885
commit d23603322e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -240,8 +240,6 @@ class CompiledProgram(object):
"share_vars_from is not compiled and run, so there is no "
"var to share.")
self._local_scopes = self._share_vars_from._executor.local_scopes()
# drop the local_exe_scopes of the previous parallel_executor
self._share_vars_from._executor.drop_local_exe_scopes()
else:
assert scope is not None, ""
self._local_scopes = []

@ -163,6 +163,7 @@ class ParallelExecutor(object):
assert isinstance(
share_vars_from, ParallelExecutor
), "The share_vars_from should be ParallelExecutor."
self._compiled_program.with_data_parallel(
loss_name=loss_name,
build_strategy=build_strategy,
@ -172,7 +173,6 @@ class ParallelExecutor(object):
self._place = core.CUDAPlace(0) if use_cuda else core.CPUPlace()
self._exe = executor.Executor(self._place)
self._compiled_program._compile(place=self._place, scope=self._scope)
def run(self, fetch_list, feed=None, feed_dict=None, return_numpy=True):
"""

Loading…
Cancel
Save