Incompatibile CPUPlace() arguments used in ParallelExecutor's constructor
Created by: wojtuss
In python/paddle/fluid/parallel_executor.py
, in the ParallelExecutor
's constructor there is an incrorrect call to CPUPlace
's constructor from paddle/fluid/platform/place.h
. CPUPlace()
accepts no arguments. In ParallelExecutor
it is called with an int
argument:
...
if use_cuda:
for i in xrange(core.get_cuda_device_count()):
p = core.Place()
self._act_places.append(core.CUDAPlace(i))
p.set_place(self._act_places[-1])
self._places.append(p)
else:
for i in xrange(multiprocessing.cpu_count()):
p = core.Place()
self._act_places.append(core.CPUPlace(i))
p.set_place(self._act_places[-1])
self._places.append(p)
assert self._places, "no place for execution"
...