synchronize

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

Warning

API “paddle.device.xpu.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.xpu will be removed in future

Wait for the compute on the given XPU device to finish.

Parameters
  • device (paddle.XPUPlace()|int, optional) – The device or the ID of the device.

  • None (If device is) – None.

  • Default (the device is the current device.) – None.

Examples

>>> 
>>> import paddle
>>> paddle.device.set_device('xpu')
>>> paddle.device.xpu.synchronize()
>>> paddle.device.xpu.synchronize(0)
>>> paddle.device.xpu.synchronize(paddle.XPUPlace(0))