torch.xpu.synchronize¶
- torch.xpu.synchronize(device=None)[source][source]¶
等待 XPU 裝置上所有流中的所有核完成執行。
- 引數
device (torch.device or int, optional) – 要同步的裝置。如果
device是None(預設),則使用current_device()指定的當前裝置。
等待 XPU 裝置上所有流中的所有核完成執行。
device (torch.device or int, optional) – 要同步的裝置。如果 device 是 None (預設),則使用 current_device() 指定的當前裝置。