Use `#ifdef` instead of `if` to guard `cudaDeviceSynchronize` calls in
`synchronize_stream` to avoid breaking debug builds.
Bug
Bug
MODIFY
thrust/system/cuda/detail/par.h
thrust/system/cuda/detail/par.h
@@ -61,13 +61,12 @@ __host__ __device__
cudaError_t
synchronize_stream(execution_policy<Derived> &)
{
- if (__THRUST_HAS_CUDART__)
- {
+ #if __THRUST_HAS_CUDART__
cudaDeviceSynchronize();
return cudaGetLastError();
- }
- else
+ #else
return cudaSuccess;
+ #endif
}

Use `#ifdef` instead of `if` to guard `cudaDeviceSynchronize` calls in
`synchronize_stream` to avoid breaking debug builds.

Bug 2455740
Bug 2379510