Skip to content

Commit 6b89b23

Browse files
committed
Add missing waits in graph tests
1 parent 1efde99 commit 6b89b23

6 files changed

+13
-7
lines changed

sycl/test/graph/graph-explicit-repeated-exec.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,17 @@ int main() {
3636
assert(arr[i] == 0);
3737
}
3838

39-
q.submit([&](sycl::handler &h) { h.ext_oneapi_graph(executable_graph); });
39+
q.submit([&](sycl::handler &h) {
40+
h.ext_oneapi_graph(executable_graph);
41+
}).wait();
4042

4143
for (int i = 0; i < n; i++) {
4244
assert(arr[i] == 1);
4345
}
4446

45-
q.submit([&](sycl::handler &h) { h.ext_oneapi_graph(executable_graph); });
47+
q.submit([&](sycl::handler &h) {
48+
h.ext_oneapi_graph(executable_graph);
49+
}).wait();
4650

4751
for (int i = 0; i < n; i++)
4852
assert(arr[i] == 2);

sycl/test/graph/graph-explicit-single-node.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ int main() {
3737
assert(arr[i] == 0);
3838
}
3939

40-
q.submit([&](sycl::handler &h) { h.ext_oneapi_graph(executable_graph); });
40+
q.submit([&](sycl::handler &h) {
41+
h.ext_oneapi_graph(executable_graph);
42+
}).wait();
4143

4244
for (int i = 0; i < n; i++)
4345
assert(arr[i] == 1);

sycl/test/graph/graph-record-dotp-buffer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ int main() {
102102

103103
auto exec_graph = g.finalize(q.get_context());
104104

105-
q.submit([&](sycl::handler &h) { h.ext_oneapi_graph(exec_graph); });
105+
q.submit([&](sycl::handler &h) { h.ext_oneapi_graph(exec_graph); }).wait();
106106
}
107107

108108
assert(dotpData == host_gold_result());

sycl/test/graph/graph-record-dotp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ int main() {
8686

8787
auto exec_graph = g.finalize(q.get_context());
8888

89-
q.submit([&](sycl::handler &h) { h.ext_oneapi_graph(exec_graph); });
89+
q.submit([&](sycl::handler &h) { h.ext_oneapi_graph(exec_graph); }).wait();
9090

9191
assert(dotp[0] == host_gold_result());
9292

sycl/test/graph/graph-record-simple.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ int main() {
3333

3434
auto exec_graph = g.finalize(q.get_context());
3535

36-
q.submit([&](sycl::handler &h) { h.ext_oneapi_graph(exec_graph); });
36+
q.submit([&](sycl::handler &h) { h.ext_oneapi_graph(exec_graph); }).wait();
3737

3838
// Verify results
3939
for (size_t i = 0; i < n; i++) {

sycl/test/graph/graph-record-temp-scope.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ int main() {
3636

3737
auto exec_graph = g.finalize(q.get_context());
3838

39-
q.submit([&](sycl::handler &h) { h.ext_oneapi_graph(exec_graph); });
39+
q.submit([&](sycl::handler &h) { h.ext_oneapi_graph(exec_graph); }).wait();
4040

4141
// Verify results
4242
for (size_t i = 0; i < n; i++) {

0 commit comments

Comments
 (0)