Waits for all kernels in all streams on a CUDA device to complete.
cuda_synchronize(device = NULL)
device
cuda_current_device()
Useful links