@@ -29,6 +29,7 @@ int main() {
2929 const sycl::device Device = Queue.get_device ();
3030
3131 uint32_t *Data = malloc_shared<uint32_t >(N, Queue);
32+ std::fill (Data, Data + N, 0 );
3233
3334 ze_command_list_handle_t ZeCommandList;
3435 bool success = getCommandListFromQueue (Queue, ZeCommandList);
@@ -45,7 +46,7 @@ int main() {
4546
4647 Queue.submit ([&](handler &CGH ) {
4748 CGH .parallel_for (range<1 >{N}, [=](id<1 > idx) {
48- Data[idx] = static_cast <uint32_t >(idx[0 ]) + 1 ;
49+ Data[idx] + = static_cast <uint32_t >(idx[0 ]) + 1 ;
4950 });
5051 });
5152
@@ -63,6 +64,7 @@ int main() {
6364 verifier.verify (EXECUTING );
6465
6566 auto ExecutableGraph = Graph.finalize ();
67+
6668 Queue.submit ([&](handler &CGH ) { CGH .ext_oneapi_graph (ExecutableGraph); });
6769 Queue.wait ();
6870
@@ -71,6 +73,14 @@ int main() {
7173 assert (check_value (i, Expected, Data[i], " Data" ));
7274 }
7375
76+ Queue.submit ([&](handler &CGH ) { CGH .ext_oneapi_graph (ExecutableGraph); });
77+ Queue.wait ();
78+
79+ for (size_t i = 0 ; i < N; i++) {
80+ uint32_t Expected = static_cast <uint32_t >((i + 1 ) * 6 + 30 );
81+ assert (check_value (i, Expected, Data[i], " Data" ));
82+ }
83+
7484 free (Data, Queue);
7585 return 0 ;
7686}
0 commit comments