Skip to content

Commit a9cefd9

Browse files
authored
Use synchronize_optional for device-to-device copy in thrust::copy() (#3149)
1 parent abd34ff commit a9cefd9

File tree

1 file changed

+1
-1
lines changed
  • thrust/thrust/system/cuda/detail

1 file changed

+1
-1
lines changed

thrust/thrust/system/cuda/detail/util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ trivial_copy_device_to_device(Policy& policy, Type* dst, Type const* src, size_t
174174
cudaStream_t stream = cuda_cub::stream(policy);
175175
//
176176
status = ::cudaMemcpyAsync(dst, src, sizeof(Type) * count, cudaMemcpyDeviceToDevice, stream);
177-
cuda_cub::synchronize(policy);
177+
cuda_cub::synchronize_optional(policy);
178178
return status;
179179
}
180180

0 commit comments

Comments
 (0)