synchronize

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

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))