Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 9ca4851

Browse files
[SYCL] Remove host run and dependencies from SYCL/Scheduler tests (#1218)
This commit removes the host run and any assumptions and operations related to the host device from the tests in SYCL/Scheduler. Co-authored-by: Sachkov, Alexey <alexey.sachkov@intel.com> Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
1 parent d6e43f6 commit 9ca4851

File tree

7 files changed

+1
-69
lines changed

7 files changed

+1
-69
lines changed

SYCL/Scheduler/BasicSchedulerTests.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-
// RUN: %HOST_RUN_PLACEHOLDER %t.out
32
// RUN: %CPU_RUN_PLACEHOLDER %t.out
43
// RUN: %GPU_RUN_PLACEHOLDER %t.out
54
// RUN: %ACC_RUN_PLACEHOLDER %t.out

SYCL/Scheduler/CommandCleanupThreadSafety.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// UNSUPPORTED: windows
22
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -lpthread
3-
// RUN: %HOST_RUN_PLACEHOLDER %t.out
43
// RUN: %CPU_RUN_PLACEHOLDER %t.out
54
// RUN: %ACC_RUN_PLACEHOLDER %t.out
65
// RUN: %GPU_RUN_PLACEHOLDER %t.out

SYCL/Scheduler/DataMovement.cpp

Lines changed: 0 additions & 11 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 %debug_option
2-
// RUN: %HOST_RUN_PLACEHOLDER %t.out
32
// RUN: %CPU_RUN_PLACEHOLDER %t.out
43
// RUN: %GPU_RUN_PLACEHOLDER %t.out
54
//
@@ -58,7 +57,6 @@ template <typename T> class CustomAllocator {
5857
int main() {
5958
TestQueue Queue1(sycl::default_selector{});
6059
TestQueue Queue2(sycl::default_selector{});
61-
TestQueue Queue3(sycl::host_selector{});
6260

6361
std::vector<int> Data(1);
6462

@@ -83,14 +81,5 @@ int main() {
8381

8482
{ auto HostAcc = Buf.get_access<sycl_access_mode::read>(); }
8583

86-
Queue3.submit([&](sycl::handler &CGH) {
87-
auto BufAcc = Buf.get_access<sycl_access_mode::read_write>(CGH);
88-
CGH.single_task<class third_kernel>([=]() { BufAcc[0] = 43; });
89-
});
90-
91-
Queue3.wait_and_throw();
92-
93-
{ auto HostAcc = Buf.get_access<sycl_access_mode::read>(); }
94-
9584
return 0;
9685
}

SYCL/Scheduler/InOrderQueueDeps.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-
// RUN: env %HOST_RUN_PLACEHOLDER %t.out
32
// RUN: env SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out 2>&1 %CPU_CHECK_PLACEHOLDER
43
// RUN: env SYCL_PI_TRACE=2 %GPU_RUN_PLACEHOLDER %t.out 2>&1 %GPU_CHECK_PLACEHOLDER
54
// RUN: env SYCL_PI_TRACE=2 %ACC_RUN_PLACEHOLDER %t.out 2>&1 %ACC_CHECK_PLACEHOLDER

SYCL/Scheduler/MemObjRemapping.cpp

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,10 @@ int main() {
2121
std::size_t Size = 64;
2222
range<1> Range{Size};
2323
buffer<int, 1> BufA{Range};
24-
buffer<int, 1> BufB{Range};
2524

2625
Q.submit([&](handler &Cgh) {
2726
auto AccA = BufA.get_access<access::mode::read_write>(Cgh);
28-
auto AccB = BufB.get_access<access::mode::read_write>(Cgh);
29-
Cgh.parallel_for<Foo>(Range, [=](id<1> Idx) {
30-
AccA[Idx] = Idx[0];
31-
AccB[Idx] = Idx[0];
32-
});
27+
Cgh.parallel_for<Foo>(Range, [=](id<1> Idx) { AccA[Idx] = Idx[0]; });
3328
});
3429

3530
{
@@ -39,16 +34,9 @@ int main() {
3934
// CHECK-NEXT: :
4035
// CHECK-NEXT: :
4136
// CHECK-NEXT: : 1
42-
// CHECK: piEnqueueMemBufferMap
43-
// CHECK-NEXT: :
44-
// CHECK-NEXT: :
45-
// CHECK-NEXT: :
46-
// CHECK-NEXT: : 1
4737
auto AccA = BufA.get_access<access::mode::read>();
48-
auto AccB = BufB.get_access<access::mode::read>();
4938
for (std::size_t I = 0; I < Size; ++I) {
5039
assert(AccA[I] == I);
51-
assert(AccB[I] == I);
5240
}
5341
}
5442
{
@@ -63,23 +51,9 @@ int main() {
6351
AccA[I] = 2 * I;
6452
}
6553

66-
queue HostQ{host_selector()};
67-
// CHECK: piEnqueueMemUnmap
68-
// CHECK: piEnqueueMemBufferMap
69-
// CHECK-NEXT: :
70-
// CHECK-NEXT: :
71-
// CHECK-NEXT: :
72-
// CHECK-NEXT: : 3
73-
HostQ.submit([&](handler &Cgh) {
74-
auto AccB = BufB.get_access<access::mode::write>(Cgh);
75-
Cgh.parallel_for<Bar>(Range, [=](id<1> Idx) { AccB[Idx] = 2 * Idx[0]; });
76-
});
77-
7854
// CHECK-NOT: piEnqueueMemBufferMap
7955
auto AccA = BufA.get_access<access::mode::read>();
80-
auto AccB = BufB.get_access<access::mode::read>();
8156
for (std::size_t I = 0; I < Size; ++I) {
8257
assert(AccA[I] == 2 * I);
83-
assert(AccB[I] == 2 * I);
8458
}
8559
}

SYCL/Scheduler/MultipleDevices.cpp

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -93,27 +93,10 @@ int multidevice_test(queue MyQueue1, queue MyQueue2) {
9393
}
9494

9595
int main() {
96-
host_selector hostSelector;
9796
cpu_selector CPUSelector;
9897
gpu_selector GPUSelector;
9998

10099
int Result = -1;
101-
try {
102-
queue MyQueue1(hostSelector);
103-
queue MyQueue2(hostSelector);
104-
Result &= multidevice_test(MyQueue1, MyQueue2);
105-
} catch (sycl::runtime_error &) {
106-
std::cout << "Skipping host and host" << std::endl;
107-
}
108-
109-
try {
110-
queue MyQueue1(hostSelector);
111-
queue MyQueue2(CPUSelector);
112-
Result &= multidevice_test(MyQueue1, MyQueue2);
113-
} catch (sycl::runtime_error &) {
114-
std::cout << "Skipping host and CPU" << std::endl;
115-
}
116-
117100
try {
118101
queue MyQueue1(CPUSelector);
119102
queue MyQueue2(CPUSelector);
@@ -132,16 +115,6 @@ int main() {
132115
std::cout << "Skipping CPU and GPU" << std::endl;
133116
}
134117

135-
try {
136-
queue MyQueue1(hostSelector);
137-
queue MyQueue2(GPUSelector);
138-
Result &= multidevice_test(MyQueue1, MyQueue2);
139-
} catch (sycl::runtime_error &) {
140-
std::cout << "Skipping host and GPU" << std::endl;
141-
} catch (sycl::compile_program_error &) {
142-
std::cout << "Skipping CPU and GPU" << std::endl;
143-
}
144-
145118
try {
146119
queue MyQueue1(GPUSelector);
147120
queue MyQueue2(GPUSelector);

SYCL/Scheduler/ReleaseResourcesTest.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 -fsycl-dead-args-optimization %s -o %t.out
2-
// RUN: env %HOST_RUN_PLACEHOLDER %t.out
32
// RUN: env SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out 2>&1 %CPU_CHECK_PLACEHOLDER
43
// RUN: env SYCL_PI_TRACE=2 %GPU_RUN_PLACEHOLDER %t.out 2>&1 %GPU_CHECK_PLACEHOLDER
54
// RUN: env SYCL_PI_TRACE=2 %ACC_RUN_PLACEHOLDER %t.out 2>&1 %ACC_CHECK_PLACEHOLDER

0 commit comments

Comments
 (0)