提交 4b073c95 编写于 作者: S sneaxiy

fix compiler

test=develop
上级 ac0e0f51
...@@ -526,7 +526,6 @@ paddle.reader.buffered (ArgSpec(args=['reader', 'size'], varargs=None, keywords= ...@@ -526,7 +526,6 @@ paddle.reader.buffered (ArgSpec(args=['reader', 'size'], varargs=None, keywords=
paddle.reader.compose (ArgSpec(args=[], varargs='readers', keywords='kwargs', defaults=None), ('document', '884291104e1c3f37f33aae44b7deeb0d')) paddle.reader.compose (ArgSpec(args=[], varargs='readers', keywords='kwargs', defaults=None), ('document', '884291104e1c3f37f33aae44b7deeb0d'))
paddle.reader.chain (ArgSpec(args=[], varargs='readers', keywords=None, defaults=None), ('document', 'd22c34e379a53901ae67a6bca7f4def4')) paddle.reader.chain (ArgSpec(args=[], varargs='readers', keywords=None, defaults=None), ('document', 'd22c34e379a53901ae67a6bca7f4def4'))
paddle.reader.shuffle (ArgSpec(args=['reader', 'buf_size'], varargs=None, keywords=None, defaults=None), ('document', 'e42ea6fee23ce26b23cb142cd1d6522d')) paddle.reader.shuffle (ArgSpec(args=['reader', 'buf_size'], varargs=None, keywords=None, defaults=None), ('document', 'e42ea6fee23ce26b23cb142cd1d6522d'))
paddle.reader.ComposeNotAligned.__init__
paddle.reader.firstn (ArgSpec(args=['reader', 'n'], varargs=None, keywords=None, defaults=None), ('document', 'c5bb8f7dd4f917f1569a368aab5b8aad')) paddle.reader.firstn (ArgSpec(args=['reader', 'n'], varargs=None, keywords=None, defaults=None), ('document', 'c5bb8f7dd4f917f1569a368aab5b8aad'))
paddle.reader.xmap_readers (ArgSpec(args=['mapper', 'reader', 'process_num', 'buffer_size', 'order'], varargs=None, keywords=None, defaults=(False,)), ('document', '283bc0b8a0e26ae186b8b9bee4aec560')) paddle.reader.xmap_readers (ArgSpec(args=['mapper', 'reader', 'process_num', 'buffer_size', 'order'], varargs=None, keywords=None, defaults=(False,)), ('document', '283bc0b8a0e26ae186b8b9bee4aec560'))
paddle.reader.PipeReader.__init__ (ArgSpec(args=['self', 'command', 'bufsize', 'file_type'], varargs=None, keywords=None, defaults=(8192, 'plain')), ('document', '6adf97f83acf6453d4a6a4b1070f3754')) paddle.reader.PipeReader.__init__ (ArgSpec(args=['self', 'command', 'bufsize', 'file_type'], varargs=None, keywords=None, defaults=(8192, 'plain')), ('document', '6adf97f83acf6453d4a6a4b1070f3754'))
......
...@@ -149,8 +149,7 @@ class CompiledProgram(object): ...@@ -149,8 +149,7 @@ class CompiledProgram(object):
self._places = [_place_obj(p) for p in places] self._places = [_place_obj(p) for p in places]
else: else:
self._places = None self._places = None
self._build_strategy.is_distribution = framework.is_pserver_mode( self._build_strategy.is_distribution = _is_pserver_mode(self._program)
self._program)
return self return self
def with_inference_optimize(self, config): def with_inference_optimize(self, config):
...@@ -191,7 +190,7 @@ class CompiledProgram(object): ...@@ -191,7 +190,7 @@ class CompiledProgram(object):
assert scope is not None, "" assert scope is not None, ""
self._local_scopes = [] self._local_scopes = []
self._exec_strategy.use_cuda = isinstance(self._place, core.CUDAPlace) self._exec_strategy.use_cuda = use_cuda
has_set_place = (self._places is not None) has_set_place = (self._places is not None)
if has_set_place: if has_set_place:
desire_place = _place_obj(self._place) desire_place = _place_obj(self._place)
......
...@@ -99,7 +99,8 @@ class ParallelExecutor(object): ...@@ -99,7 +99,8 @@ class ParallelExecutor(object):
build_strategy.num_trainers = num_trainers build_strategy.num_trainers = num_trainers
build_strategy.trainer_id = trainer_id build_strategy.trainer_id = trainer_id
self._places = compiler.get_available_places(use_cuda) self._places = framework.cuda_places(
) if use_cuda else framework.cpu_places()
self._scope = scope if scope is not None else executor.global_scope() self._scope = scope if scope is not None else executor.global_scope()
main_program = main_program if main_program is not None \ main_program = main_program if main_program is not None \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册