File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
sycl/test-e2e/Graph/RecordReplay Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ int main() {
1515 sycl::property::queue::in_order ());
1616 exp_ext::command_graph Graph{Queue1};
1717
18- std::vector<float > Data (Size, 0 .0f );
18+ std::vector<float > Data (Size, 1 .0f );
1919
2020 float *DevicePtr = sycl::malloc_device<float >(Size, Queue1);
2121
@@ -49,13 +49,18 @@ int main() {
4949 #endif
5050 });
5151
52- std::vector<float > HostData (Size, 0 .0f );
52+ std::vector<float > HostData (Size, 7 .0f );
5353 Queue1.memcpy (HostData.data (), DevicePtr, Size * sizeof (float )).wait ();
54+ bool IncorrectResult = false ;
5455 for (size_t i = 0 ; i < Size; ++i) {
55- assert (HostData[i] == 1 .0f );
56+ IncorrectResult |= !(HostData[i] == 2 .0f );
57+ if (IncorrectResult)
58+ {
59+ std::cout << " INCORRECT RESULT DETECTED! Value at " << i << " was " << HostData[i] << std::endl;
5660 }
57-
61+ }
62+
5863 sycl::free (DevicePtr, Queue1);
5964
60- return 0 ;
65+ return IncorrectResult ;
6166}
You can’t perform that action at this time.
0 commit comments