synchronize¶
- paddle.device.cuda. synchronize ( device=None ) [source]
-
Wait for the compute on the given CUDA device to finish.
- Parameters
-
device (paddle.CUDAPlace()|int, optional) – The device or the ID of the device. If device is None, the device is the current device. Default: None.
Examples
# required: gpu import paddle paddle.device.cuda.synchronize() paddle.device.cuda.synchronize(0) paddle.device.cuda.synchronize(paddle.CUDAPlace(0))