# tensorplay.cuda.synchronize

Source: https://www.tensorplay.cn/docs/generated/tensorplay.cuda.synchronize.html

# tensorplay.cuda.synchronize

tensorplay.cuda.synchronize(device: [Any](https://docs.python.org/3/library/typing.html#typing.Any) | [None](https://docs.python.org/3/library/constants.html#None) = None) &#x2192; [None](https://docs.python.org/3/library/constants.html#None)[[source]](../_modules/tensorplay/cuda.html#synchronize)

Wait for all kernels in all streams on a CUDA device to complete.

Parameters:

device ([tensorplay.Device](tensorplay.Device.html#tensorplay.Device) or [int](https://docs.python.org/3/library/functions.html#int), optional) – device for which to synchronize.
It uses the current device, given by [current_device()](tensorplay.cuda.current_device.html#tensorplay.cuda.current_device),
if [device](tensorplay.cuda.device.html#tensorplay.cuda.device) is None (default).
