Skip to content

Commit 25578d6

Browse files
committed
add comment to indicate that the device to device copy calls are synchronous
1 parent 624bd83 commit 25578d6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

source/adapters/cuda/image.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -659,8 +659,6 @@ UR_APIEXPORT ur_result_t UR_APICALL urBindlessImagesImageCopyExp(
659659
enqueueEventsWait(hQueue, Stream, numEventsInWaitList, phEventWaitList);
660660

661661
// We have to use a different copy function for each image dimensionality.
662-
// All the async copy function should be treated as synchronous because of
663-
// the explicit call to cuStreamSynchronize at the end
664662

665663
if (imageCopyFlags == UR_EXP_IMAGE_COPY_FLAG_HOST_TO_DEVICE) {
666664
if (pImageDesc->type == UR_MEM_TYPE_IMAGE1D) {
@@ -834,6 +832,10 @@ UR_APIEXPORT ur_result_t UR_APICALL urBindlessImagesImageCopyExp(
834832
}
835833
} else {
836834
// imageCopyFlags == UR_EXP_IMAGE_COPY_FLAG_DEVICE_TO_DEVICE
835+
836+
// All the following async copy function calls should be treated as
837+
// synchronous because of the explicit call to cuStreamSynchronize at
838+
// the end
837839
if (pImageDesc->type == UR_MEM_TYPE_IMAGE1D) {
838840
CUDA_MEMCPY2D cpy_desc = {};
839841
cpy_desc.srcXInBytes = srcOffset.x;

0 commit comments

Comments
 (0)