synchronize¶
- paddle.device. synchronize ( device=None ) [source]
-
Wait for the compute on the given device to finish. :param device: The device which want to wait for. If device is None, the device is the current device. Default: None.
It can be
gpu
,gpu:x
,xpu
,xpu:x
,custom_device
,custom_device:x
, wherecustom_device
is the name of CustomDevicec, wherex
is the index of the GPUs, XPUs. And it can be paddle.CUDAPlace(n) or paddle.XPUPlace(n) or paddle.CustomPlace(n).Examples