cpu_places¶
-
paddle.fluid.
cpu_places
(device_count=None)[source] This function creates a list of
fluid.CPUPlace
objects, and returns the created list.If
device_count
is None, the device count would be determined by environment variableCPU_NUM
. IfCPU_NUM
is not set, the default value is 1, i.e. CPU_NUM=1.CPU_NUM
indicates the number of devices used in the current task. The running of the program can be accelerated ifCPU_NUM
is the same as the number of physical cores.- Parameters
device_count (int, optional) – device number. Default: None.
- Returns
Created list of CPU places.
- Return type
list of fluid.CPUPlace
Examples
import paddle.fluid as fluid cpu_places = fluid.cpu_places()