diff --git a/sycl/test/graph/graph-explicit-dotp.cpp b/sycl/test/graph/graph-explicit-dotp.cpp index 0b492d526798a..7d0a5bcdae30e 100644 --- a/sycl/test/graph/graph-explicit-dotp.cpp +++ b/sycl/test/graph/graph-explicit-dotp.cpp @@ -1,5 +1,4 @@ // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -#include #include #include diff --git a/sycl/test/graph/graph-explicit-node-ordering.cpp b/sycl/test/graph/graph-explicit-node-ordering.cpp index 0b7a0be3faf66..2ac11bbba28f2 100644 --- a/sycl/test/graph/graph-explicit-node-ordering.cpp +++ b/sycl/test/graph/graph-explicit-node-ordering.cpp @@ -1,5 +1,4 @@ // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -#include #include #include diff --git a/sycl/test/graph/graph-explicit-queue-shortcuts.cpp b/sycl/test/graph/graph-explicit-queue-shortcuts.cpp index 7c20fe612f32f..8f6d0c668af8b 100644 --- a/sycl/test/graph/graph-explicit-queue-shortcuts.cpp +++ b/sycl/test/graph/graph-explicit-queue-shortcuts.cpp @@ -1,5 +1,4 @@ // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -#include #include #include diff --git a/sycl/test/graph/graph-explicit-reduction.cpp b/sycl/test/graph/graph-explicit-reduction.cpp index 471b381b525ec..d652c1d9e3ada 100644 --- a/sycl/test/graph/graph-explicit-reduction.cpp +++ b/sycl/test/graph/graph-explicit-reduction.cpp @@ -1,5 +1,4 @@ // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -#include #include #include diff --git a/sycl/test/graph/graph-explicit-repeated-exec.cpp b/sycl/test/graph/graph-explicit-repeated-exec.cpp index 1ebbeb73406a6..e4c29204d1bd5 100644 --- a/sycl/test/graph/graph-explicit-repeated-exec.cpp +++ b/sycl/test/graph/graph-explicit-repeated-exec.cpp @@ -1,5 +1,4 @@ // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -#include #include #include @@ -27,24 +26,20 @@ int main() { }); }); - bool check = true; for (int i = 0; i < n; i++) { - if (arr[i] != 0) - check = false; + assert(arr[i] == 0); } auto executable_graph = g.finalize(q.get_context()); for (int i = 0; i < n; i++) { - if (arr[i] != 0) - check = false; + assert(arr[i] == 0); } q.submit([&](sycl::handler &h) { h.ext_oneapi_graph(executable_graph); }); for (int i = 0; i < n; i++) { - if (arr[i] != 1) - check = false; + assert(arr[i] == 1); } q.submit([&](sycl::handler &h) { h.ext_oneapi_graph(executable_graph); }); diff --git a/sycl/test/graph/graph-explicit-saxpy.cpp b/sycl/test/graph/graph-explicit-saxpy.cpp index 233e8e8aa50bd..e8a422ad23f3a 100644 --- a/sycl/test/graph/graph-explicit-saxpy.cpp +++ b/sycl/test/graph/graph-explicit-saxpy.cpp @@ -1,5 +1,4 @@ // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -#include #include #include diff --git a/sycl/test/graph/graph-explicit-single-node.cpp b/sycl/test/graph/graph-explicit-single-node.cpp index 51d313aa6a1f8..69e8d30942acc 100644 --- a/sycl/test/graph/graph-explicit-single-node.cpp +++ b/sycl/test/graph/graph-explicit-single-node.cpp @@ -27,17 +27,14 @@ int main() { }); }); - bool check = true; for (int i = 0; i < n; i++) { - if (arr[i] != 0) - check = false; + assert(arr[i] == 0); } auto executable_graph = g.finalize(q.get_context()); for (int i = 0; i < n; i++) { - if (arr[i] != 0) - check = false; + assert(arr[i] == 0); } q.submit([&](sycl::handler &h) { h.ext_oneapi_graph(executable_graph); }); diff --git a/sycl/test/graph/graph-explicit-subgraph.cpp b/sycl/test/graph/graph-explicit-subgraph.cpp index 160418a9ae012..b4cf9b09a68a4 100644 --- a/sycl/test/graph/graph-explicit-subgraph.cpp +++ b/sycl/test/graph/graph-explicit-subgraph.cpp @@ -2,7 +2,6 @@ // Modified version of the dotp example which submits part of the graph as a // sub-graph -#include #include #include diff --git a/sycl/test/graph/graph-record-dotp-buffer.cpp b/sycl/test/graph/graph-record-dotp-buffer.cpp index 0e49e86cf1cad..de32cf66089e2 100644 --- a/sycl/test/graph/graph-record-dotp-buffer.cpp +++ b/sycl/test/graph/graph-record-dotp-buffer.cpp @@ -1,7 +1,5 @@ // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out #include -#include -#include #include @@ -102,11 +100,7 @@ int main() { q.submit([&](sycl::handler &h) { h.ext_oneapi_graph(exec_graph); }); } - if (dotpData != host_gold_result()) { - std::cout << "Test failed: Error unexpected result!\n"; - } else { - std::cout << "Test passed successfuly."; - } + assert(dotpData == host_gold_result()); return 0; -} \ No newline at end of file +} diff --git a/sycl/test/graph/graph-record-dotp.cpp b/sycl/test/graph/graph-record-dotp.cpp index 538383cebc0de..507df06e461d7 100644 --- a/sycl/test/graph/graph-record-dotp.cpp +++ b/sycl/test/graph/graph-record-dotp.cpp @@ -1,7 +1,5 @@ // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out #include -#include -#include #include @@ -85,18 +83,12 @@ int main() { q.submit([&](sycl::handler &h) { h.ext_oneapi_graph(exec_graph); }); - if (dotp[0] != host_gold_result()) { - std::cout << "Test failed: Error unexpected result!\n"; - } else { - std::cout << "Test passed successfuly."; - } + assert(dotp[0] == host_gold_result()); sycl::free(dotp, q); sycl::free(x, q); sycl::free(y, q); sycl::free(z, q); - std::cout << "done.\n"; - return 0; -} \ No newline at end of file +} diff --git a/sycl/test/graph/graph-record-simple.cpp b/sycl/test/graph/graph-record-simple.cpp index e0231a5f90abd..297661caf5431 100644 --- a/sycl/test/graph/graph-record-simple.cpp +++ b/sycl/test/graph/graph-record-simple.cpp @@ -1,6 +1,5 @@ // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -#include #include #include @@ -36,24 +35,12 @@ int main() { q.submit([&](sycl::handler &h) { h.ext_oneapi_graph(exec_graph); }); - int errors = 0; // Verify results for (size_t i = 0; i < n; i++) { - if (arr[i] != expectedValue) { - std::cout << "Test failed: Unexpected result at index: " << i - << ", expected: " << expectedValue << " actual: " << arr[i] - << "\n"; - errors++; - } + assert(arr[i] == expectedValue); } - if (errors == 0) { - std::cout << "Test passed successfuly."; - } - - std::cout << "done.\n"; - sycl::free(arr, q.get_context()); - return errors; -} \ No newline at end of file + return 0; +}