This function creates a list of
fluid.CPUPlaceobjects, and returns the created list.
device_countis None, the device count would be determined by environment variable
CPU_NUMis not set, the default value is 1, i.e. CPU_NUM=1.
CPU_NUMindicates the number of devices used in the current task. The running of the program can be accelerated if
CPU_NUMis the same as the number of physical cores.
device_count (int, optional) – device number. Default: None.
Created list of CPU places.
- Return type
list of fluid.CPUPlace
import paddle.fluid as fluid cpu_places = fluid.cpu_places()