synchronize

paddle.device.cuda. synchronize ( device=None ) [source]

Warning

API “paddle.device.cuda.synchronize” is deprecated since 2.5.0, and will be removed in future versions. Please use “paddle.device.synchronize” instead. Reason: synchronize in paddle.device.cuda will be removed in future

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

>>> 
>>> import paddle

>>> paddle.device.cuda.synchronize()
>>> paddle.device.cuda.synchronize(0)
>>> paddle.device.cuda.synchronize(paddle.CUDAPlace(0))