diff --git a/thrust/system/cuda/detail/core/agent_launcher.h b/thrust/system/cuda/detail/core/agent_launcher.h index b604f293e..b9ecbe2e3 100644 --- a/thrust/system/cuda/detail/core/agent_launcher.h +++ b/thrust/system/cuda/detail/core/agent_launcher.h @@ -512,12 +512,7 @@ namespace core { THRUST_RUNTIME_FUNCTION void sync() const { - if (debug_sync) - { - NV_IF_TARGET(NV_IS_HOST, - (cudaStreamSynchronize(stream);), - (cub::detail::device_synchronize();)); - } + CubDebug(cub::detail::DebugSyncStream(stream, this->debug_sync)); } template