Skip to content

Commit 61a45c4

Browse files
vladimirlazbb-sycl
authored andcommitted
[SYCL][XPTI] Improve tests formatting (intel#703)
- use @line macro; - print pointers in hexadecimal format.
1 parent 6c25ed6 commit 61a45c4

File tree

9 files changed

+52
-0
lines changed

9 files changed

+52
-0
lines changed

SYCL/XPTI/Inputs/buffer_info_collector.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,16 @@ XPTI_CALLBACK_API void syclBufferCallback(uint16_t TraceType,
101101
case xpti::trace_point_type_t::offload_alloc_construct: {
102102
auto BufConstr = (xpti::offload_buffer_data_t *)UserData;
103103
std::cout << IId << "|Create buffer|0x" << std::hex
104+
<<<<<<< HEAD
104105
<< BufConstr->user_object_handle << "|0x"
105106
<< BufConstr->host_object_handle << "|" << std::dec
106107
<< BufConstr->element_type << "|" << BufConstr->element_size
107108
<< "|" << BufConstr->dim << "|"
108109
<< "{" << BufConstr->range[0] << "," << BufConstr->range[1] << ","
109110
<< BufConstr->range[2] << "}|"
111+
=======
112+
<< BufConstr->user_object_handle << "|" << std::dec
113+
>>>>>>> c1f4fa1c2 ([SYCL][XPTI] Improve tests formatting (#703))
110114
<< Event->reserved.payload->source_file << ":"
111115
<< Event->reserved.payload->line_no << ":"
112116
<< Event->reserved.payload->column_no << "\n";

SYCL/XPTI/buffer/accessors.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ int main() {
1717
bool MismatchFound = false;
1818
sycl::queue Queue{};
1919

20+
<<<<<<< HEAD
2021
// CHECK:{{[0-9]+}}|Create buffer|[[BUFFERID:[0-9,a-f,x]+]]|0x0|{{i(nt)*}}|4|1|{3,0,0}|{{.*}}accessors.cpp:[[# @LINE + 1]]:24
22+
=======
23+
// CHECK:{{[0-9]+}}|Create buffer|[[BUFFERID:[0-9,a-f,x]+]]|{{.*}}accessors.cpp:[[# @LINE + 1]]:24
24+
>>>>>>> c1f4fa1c2 ([SYCL][XPTI] Improve tests formatting (#703))
2125
sycl::buffer<int, 1> Buf(3);
2226

2327
sycl::range<1> Range{Buf.size()};

SYCL/XPTI/buffer/host_array.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ int main() {
1818
int Array[4];
1919
{
2020
sycl::range<1> NumOfWorkItems{4};
21+
<<<<<<< HEAD
2122
// CHECK:{{[0-9]+}}|Create buffer|[[USERID1:[0-9,a-f,x]+]]|0x{{.*}}|{{i(nt)*}}|4|1|{4,0,0}|{{.*}}host_array.cpp:[[# @LINE + 1]]:26
23+
=======
24+
// CHECK:{{[0-9]+}}|Create buffer|[[USERID1:[0-9,a-f,x]+]]|{{.*}}host_array.cpp:[[# @LINE + 1]]:26
25+
>>>>>>> c1f4fa1c2 ([SYCL][XPTI] Improve tests formatting (#703))
2226
sycl::buffer<int, 1> Buffer1(Array, NumOfWorkItems);
2327

2428
// CHECK:{{[0-9]+}}|Associate buffer|[[USERID1]]|[[BEID1:.*]]

SYCL/XPTI/buffer/in_cycle.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ int main() {
5353
// Create a SYCL queue.
5454
sycl::queue Queue{};
5555

56+
<<<<<<< HEAD
5657
// CHECK:{{[0-9]+}}|Create buffer|[[USERID1:[0-9,a-f,x]*]]|0x0|{{i(nt)*}}|4|1|{4,0,0}|{{.*}}in_cycle.cpp:17:24
5758
// CHECK:{{[0-9]+}}|Associate buffer|[[USERID1]]|[[BEID1:.*]]
5859
// CHECK:{{[0-9]+}}|Release buffer|[[USERID1]]|[[BEID1]]
@@ -62,6 +63,17 @@ int main() {
6263
// CHECK:{{[0-9]+}}|Release buffer|[[USERID2]]|[[BEID2]]
6364
// CHECK:{{[0-9]+}}|Destruct buffer|[[USERID2]]
6465
// CHECK:{{[0-9]+}}|Create buffer|[[USERID3:[0-9,a-f,x]*]]|0x0|{{i(nt)*}}|4|1|{4,0,0}|{{.*}}in_cycle.cpp:17:24
66+
=======
67+
// CHECK:{{[0-9]+}}|Create buffer|[[USERID1:[0-9,a-f,x]*]]|{{.*}}in_cycle.cpp:17:24
68+
// CHECK:{{[0-9]+}}|Associate buffer|[[USERID1]]|[[BEID1:.*]]
69+
// CHECK:{{[0-9]+}}|Release buffer|[[USERID1]]|[[BEID1]]
70+
// CHECK:{{[0-9]+}}|Destruct buffer|[[USERID1]]
71+
// CHECK:{{[0-9]+}}|Create buffer|[[USERID2:[0-9,a-f,x]*]]|{{.*}}in_cycle.cpp:17:24
72+
// CHECK:{{[0-9]+}}|Associate buffer|[[USERID2]]|[[BEID2:.*]]
73+
// CHECK:{{[0-9]+}}|Release buffer|[[USERID2]]|[[BEID2]]
74+
// CHECK:{{[0-9]+}}|Destruct buffer|[[USERID2]]
75+
// CHECK:{{[0-9]+}}|Create buffer|[[USERID3:[0-9,a-f,x]*]]|{{.*}}in_cycle.cpp:17:24
76+
>>>>>>> c1f4fa1c2 ([SYCL][XPTI] Improve tests formatting (#703))
6577
// CHECK:{{[0-9]+}}|Associate buffer|[[USERID3]]|[[BEID3:.*]]
6678
// CHECK:{{[0-9]+}}|Release buffer|[[USERID3]]|[[BEID3]]
6779
// CHECK:{{[0-9]+}}|Destruct buffer|[[USERID3]]

SYCL/XPTI/buffer/multiple_buffers.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,15 @@ int main() {
1515
bool MismatchFound = false;
1616
sycl::queue Queue{};
1717

18+
<<<<<<< HEAD
1819
// CHECK:{{[0-9]+}}|Create buffer|[[USERID1:[0-9,a-f,x]+]]|0x0|{{s(hort)*}}|2|1|{4,0,0}|{{.*}}multiple_buffers.cpp:[[# @LINE + 1]]:26
1920
sycl::buffer<short, 1> Buffer1(4);
2021
// CHECK:{{[0-9]+}}|Create buffer|[[USERID2:[0-9,a-f,x]+]]|0x0|{{c(har)*}}|1|3|{5,4,3}|{{.*}}multiple_buffers.cpp:[[# @LINE + 1]]:25
22+
=======
23+
// CHECK:{{[0-9]+}}|Create buffer|[[USERID1:[0-9,a-f,x]+]]|{{.*}}multiple_buffers.cpp:[[# @LINE + 1]]:26
24+
sycl::buffer<short, 1> Buffer1(4);
25+
// CHECK:{{[0-9]+}}|Create buffer|[[USERID2:[0-9,a-f,x]+]]|{{.*}}multiple_buffers.cpp:[[# @LINE + 1]]:25
26+
>>>>>>> c1f4fa1c2 ([SYCL][XPTI] Improve tests formatting (#703))
2127
sycl::buffer<char, 3> Buffer2({5, 4, 3});
2228

2329
sycl::range<1> NumOfWorkItems{Buffer1.size()};

SYCL/XPTI/buffer/multiple_queues.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ int main() {
2323
sycl::queue Queue1{Devices[0]};
2424
sycl::queue Queue2{Devices[1]};
2525
sycl::range<1> NumOfWorkItems{4};
26+
<<<<<<< HEAD
2627
// CHECK:{{[0-9]+}}|Create buffer|[[USERID1:0x[0-9,a-f,x]+]]|0x{{.*}}|{{i(nt)*}}|4|1|{4,0,0}|{{.*}}multiple_queues.cpp:[[# @LINE + 1]]:26
28+
=======
29+
// CHECK:{{[0-9]+}}|Create buffer|[[USERID1:0x[0-9,a-f,x]+]]|{{.*}}multiple_queues.cpp:[[# @LINE + 1]]:26
30+
>>>>>>> c1f4fa1c2 ([SYCL][XPTI] Improve tests formatting (#703))
2731
sycl::buffer<int, 1> Buffer1(Array, NumOfWorkItems);
2832

2933
Queue1.submit([&](sycl::handler &cgh) {

SYCL/XPTI/buffer/recursion.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,19 @@ int main() {
5353
// Create a SYCL queue.
5454
sycl::queue Queue{};
5555

56+
<<<<<<< HEAD
5657
// CHECK:{{[0-9]+}}|Create buffer|[[USERID1:0x[0-9,a-f,x]+]]|0x0|{{i(nt)*}}|4|1|{4,0,0}|{{.*}}recursion.cpp:17:24
5758
// CHECK:{{[0-9]+}}|Associate buffer|[[USERID1]]|[[BEID1:.*]]
5859
// CHECK:{{[0-9]+}}|Create buffer|[[USERID2:0x[0-9,a-f,x]+]]|0x0|{{i(nt)*}}|4|1|{4,0,0}|{{.*}}recursion.cpp:17:24
5960
// CHECK:{{[0-9]+}}|Associate buffer|[[USERID2]]|[[BEID2:.*]]
6061
// CHECK:{{[0-9]+}}|Create buffer|[[USERID3:0x[0-9,a-f,x]+]]|0x0|{{i(nt)*}}|4|1|{4,0,0}|{{.*}}recursion.cpp:17:24
62+
=======
63+
// CHECK:{{[0-9]+}}|Create buffer|[[USERID1:0x[0-9,a-f,x]+]]|{{.*}}recursion.cpp:17:24
64+
// CHECK:{{[0-9]+}}|Associate buffer|[[USERID1]]|[[BEID1:.*]]
65+
// CHECK:{{[0-9]+}}|Create buffer|[[USERID2:0x[0-9,a-f,x]+]]|{{.*}}recursion.cpp:17:24
66+
// CHECK:{{[0-9]+}}|Associate buffer|[[USERID2]]|[[BEID2:.*]]
67+
// CHECK:{{[0-9]+}}|Create buffer|[[USERID3:0x[0-9,a-f,x]+]]|{{.*}}recursion.cpp:17:24
68+
>>>>>>> c1f4fa1c2 ([SYCL][XPTI] Improve tests formatting (#703))
6169
// CHECK:{{[0-9]+}}|Associate buffer|[[USERID3]]|[[BEID3:.*]]
6270
// CHECK:{{[0-9]+}}|Release buffer|[[USERID3]]|[[BEID3]]
6371
// CHECK:{{[0-9]+}}|Destruct buffer|[[USERID3]]

SYCL/XPTI/buffer/sub_buffer.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,15 @@ int main() {
1717

1818
{
1919
sycl::range<1> NumOfWorkItems{128};
20+
<<<<<<< HEAD
2021
// CHECK:{{[0-9]+}}|Create buffer|[[USERID1:0x[0-9,a-f,x]+]]|0x0|{{i(nt)*}}|4|1|{128,0,0}|{{.*}}sub_buffer.cpp:[[# @LINE + 1]]:26
2122
sycl::buffer<int, 1> Buffer1(NumOfWorkItems);
2223
// CHECK:{{[0-9]+}}|Create buffer|[[USERID1:0x[0-9,a-f,x]+]]|[[USERID1]]|{{i(nt)*}}|4|1|{32,0,0}|{{.*}}sub_buffer.cpp:[[# @LINE + 1]]:26
24+
=======
25+
// CHECK:{{[0-9]+}}|Create buffer|[[USERID1:0x[0-9,a-f,x]+]]|{{.*}}sub_buffer.cpp:[[# @LINE + 1]]:26
26+
sycl::buffer<int, 1> Buffer1(NumOfWorkItems);
27+
// CHECK:{{[0-9]+}}|Create buffer|[[USERID1:0x[0-9,a-f,x]+]]|{{.*}}sub_buffer.cpp:[[# @LINE + 1]]:26
28+
>>>>>>> c1f4fa1c2 ([SYCL][XPTI] Improve tests formatting (#703))
2329
sycl::buffer<int, 1> SubBuffer{Buffer1, sycl::range<1>{32},
2430
sycl::range<1>{32}};
2531

SYCL/XPTI/buffer/use_host_ptr.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ int main() {
1818
int Array[4];
1919
{
2020
sycl::range<1> NumOfWorkItems{4};
21+
<<<<<<< HEAD
2122
// CHECK:{{[0-9]+}}|Create buffer|[[USERID1:0x[0-9,a-f,x]+]]|0x{{.*}}|{{i(nt)*}}|4|1|{4,0,0}|{{.*}}use_host_ptr.cpp:[[# @LINE + 1]]:26
23+
=======
24+
// CHECK:{{[0-9]+}}|Create buffer|[[USERID1:0x[0-9,a-f,x]+]]|{{.*}}use_host_ptr.cpp:[[# @LINE + 1]]:26
25+
>>>>>>> c1f4fa1c2 ([SYCL][XPTI] Improve tests formatting (#703))
2226
sycl::buffer<int, 1> Buffer1(Array, NumOfWorkItems,
2327
{sycl::property::buffer::use_host_ptr()});
2428

0 commit comments

Comments
 (0)