Skip to content

Commit ac958d8

Browse files
committed
Update record & replay tests
Update the record & replay tests to match changes from #72 which were missed after merging the record and replay branch: * Remove unused headers * Uses asserts instead of printing to std out
1 parent d2ff468 commit ac958d8

11 files changed

+12
-53
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
2-
#include <iostream>
32
#include <sycl/sycl.hpp>
43

54
#include <sycl/ext/oneapi/experimental/graph.hpp>

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
2-
#include <iostream>
32
#include <sycl/sycl.hpp>
43

54
#include <sycl/ext/oneapi/experimental/graph.hpp>

sycl/test/graph/graph-explicit-queue-shortcuts.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
2-
#include <iostream>
32
#include <sycl/sycl.hpp>
43

54
#include <sycl/ext/oneapi/experimental/graph.hpp>

sycl/test/graph/graph-explicit-reduction.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
2-
#include <iostream>
32
#include <sycl/sycl.hpp>
43

54
#include <sycl/ext/oneapi/experimental/graph.hpp>

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

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
2-
#include <iostream>
32
#include <sycl/sycl.hpp>
43

54
#include <sycl/ext/oneapi/experimental/graph.hpp>
@@ -27,24 +26,20 @@ int main() {
2726
});
2827
});
2928

30-
bool check = true;
3129
for (int i = 0; i < n; i++) {
32-
if (arr[i] != 0)
33-
check = false;
30+
assert(arr[i] == 0);
3431
}
3532

3633
auto executable_graph = g.finalize(q.get_context());
3734

3835
for (int i = 0; i < n; i++) {
39-
if (arr[i] != 0)
40-
check = false;
36+
assert(arr[i] == 0);
4137
}
4238

4339
q.submit([&](sycl::handler &h) { h.ext_oneapi_graph(executable_graph); });
4440

4541
for (int i = 0; i < n; i++) {
46-
if (arr[i] != 1)
47-
check = false;
42+
assert(arr[i] == 1);
4843
}
4944

5045
q.submit([&](sycl::handler &h) { h.ext_oneapi_graph(executable_graph); });

sycl/test/graph/graph-explicit-saxpy.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
2-
#include <iostream>
32
#include <sycl/sycl.hpp>
43

54
#include <sycl/ext/oneapi/experimental/graph.hpp>

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,14 @@ int main() {
2727
});
2828
});
2929

30-
bool check = true;
3130
for (int i = 0; i < n; i++) {
32-
if (arr[i] != 0)
33-
check = false;
31+
assert(arr[i] == 0);
3432
}
3533

3634
auto executable_graph = g.finalize(q.get_context());
3735

3836
for (int i = 0; i < n; i++) {
39-
if (arr[i] != 0)
40-
check = false;
37+
assert(arr[i] == 0);
4138
}
4239

4340
q.submit([&](sycl::handler &h) { h.ext_oneapi_graph(executable_graph); });

sycl/test/graph/graph-explicit-subgraph.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
// Modified version of the dotp example which submits part of the graph as a
44
// sub-graph
5-
#include <iostream>
65
#include <sycl/sycl.hpp>
76

87
#include <sycl/ext/oneapi/experimental/graph.hpp>

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
22
#include <CL/sycl.hpp>
3-
#include <iostream>
4-
#include <thread>
53

64
#include <sycl/ext/oneapi/experimental/graph.hpp>
75

@@ -102,11 +100,7 @@ int main() {
102100
q.submit([&](sycl::handler &h) { h.ext_oneapi_graph(exec_graph); });
103101
}
104102

105-
if (dotpData != host_gold_result()) {
106-
std::cout << "Test failed: Error unexpected result!\n";
107-
} else {
108-
std::cout << "Test passed successfuly.";
109-
}
103+
assert(dotpData == host_gold_result());
110104

111105
return 0;
112-
}
106+
}

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

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
22
#include <CL/sycl.hpp>
3-
#include <iostream>
4-
#include <thread>
53

64
#include <sycl/ext/oneapi/experimental/graph.hpp>
75

@@ -85,18 +83,12 @@ int main() {
8583

8684
q.submit([&](sycl::handler &h) { h.ext_oneapi_graph(exec_graph); });
8785

88-
if (dotp[0] != host_gold_result()) {
89-
std::cout << "Test failed: Error unexpected result!\n";
90-
} else {
91-
std::cout << "Test passed successfuly.";
92-
}
86+
assert(dotp[0] == host_gold_result());
9387

9488
sycl::free(dotp, q);
9589
sycl::free(x, q);
9690
sycl::free(y, q);
9791
sycl::free(z, q);
9892

99-
std::cout << "done.\n";
100-
10193
return 0;
102-
}
94+
}

0 commit comments

Comments
 (0)