diff --git a/sycl/plugins/cuda/pi_cuda.hpp b/sycl/plugins/cuda/pi_cuda.hpp index 13391f359ae4e..d0a7f3a9ed622 100644 --- a/sycl/plugins/cuda/pi_cuda.hpp +++ b/sycl/plugins/cuda/pi_cuda.hpp @@ -535,7 +535,7 @@ struct _pi_queue { } else { start %= size; end %= size; - if (start < end) { + if (start <= end) { sync_compute(start, end); } else { sync_compute(start, size); @@ -557,7 +557,7 @@ struct _pi_queue { } else { start %= size; end %= size; - if (start < end) { + if (start <= end) { sync_transfer(start, end); } else { sync_transfer(start, size);