Returns cudaSuccess if syncronization was or an error code if there was an issue.
cudaSuccess
Synchronizes the device, blocking until all preceding tasks in all streams have completed.