Skip to content

Commit 8f7406d

Browse files
authored
[SYCL][Bindless][E2E] Add missing wait in test between copy and verification (#18111)
Fixes #16923 'example_1_1D_read_write.cpp' has a sporadic failure on battlemage where it fails to validate the data. This is likely due to a missing 'q.wait_and_throw()' between copying the data from the device to host and verifying it. Adding the wait should fix this failure.
1 parent cfb508a commit 8f7406d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sycl/test-e2e/bindless_images/examples/example_1_1D_read_write.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ int main() {
6767
// Copy data written to imgOut to host
6868
q.ext_oneapi_copy(imgMemoryOut.get_handle(), dataOut.data(), desc);
6969

70+
// Ensure copying data from the device to host is finished before validate
71+
q.wait_and_throw();
72+
7073
// Cleanup
7174
sycl::ext::oneapi::experimental::destroy_image_handle(imgIn, q);
7275
sycl::ext::oneapi::experimental::destroy_image_handle(imgOut, q);

0 commit comments

Comments
 (0)