Skip to content

Commit

Permalink
add wait and throw
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandr-Solovev committed Dec 10, 2024
1 parent 8ab34b6 commit 4d66692
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cpp/oneapi/dal/backend/memory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ inline sycl::event memcpy_host2usm(sycl::queue& queue,
ONEDAL_ASSERT(is_known_usm(queue, dest_usm));

sycl::event memcpy_event = memcpy(queue, dest_usm, src_host, size, deps);
memcpy_event.wait_and_throw();
return memcpy_event;
}

Expand All @@ -233,6 +234,7 @@ inline sycl::event memcpy_usm2host(sycl::queue& queue,
ONEDAL_ASSERT(is_known_usm(queue, src_usm));

sycl::event memcpy_event = memcpy(queue, dest_host, src_usm, size, deps);
memcpy_event.wait_and_throw();
return memcpy_event;
}

Expand Down

0 comments on commit 4d66692

Please sign in to comment.