cuda_pinned_places¶
- paddle.fluid.framework. cuda_pinned_places ( device_count=None ) [source]
-
This function creates a list of
fluid.CUDAPinnedPlaceobjects.If
device_countis None, the device count would be determined by environment variableCPU_NUM. IfCPU_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 ifCPU_NUMis the same as the number of physical cores.- Parameters
-
device_count (int, optional) – device number. Default: None.
- Returns
-
Created list of CUDA pinned places.
- Return type
-
list of fluid.CUDAPinnedPlace
Examples
import paddle.fluid as fluid cuda_pinned_places_cpu_num = fluid.cuda_pinned_places() # or cuda_pinned_places = fluid.cuda_pinned_places(1)
