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

[SYCL] Remove host run and dependencies from SYCL/Scheduler tests #1218

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion SYCL/Scheduler/BasicSchedulerTests.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
// RUN: %HOST_RUN_PLACEHOLDER %t.out
// RUN: %CPU_RUN_PLACEHOLDER %t.out
// RUN: %GPU_RUN_PLACEHOLDER %t.out
// RUN: %ACC_RUN_PLACEHOLDER %t.out
Expand Down
1 change: 0 additions & 1 deletion SYCL/Scheduler/CommandCleanupThreadSafety.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// UNSUPPORTED: windows
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -lpthread
// RUN: %HOST_RUN_PLACEHOLDER %t.out
// RUN: %CPU_RUN_PLACEHOLDER %t.out
// RUN: %ACC_RUN_PLACEHOLDER %t.out
// RUN: %GPU_RUN_PLACEHOLDER %t.out
Expand Down
11 changes: 0 additions & 11 deletions SYCL/Scheduler/DataMovement.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out %debug_option
// RUN: %HOST_RUN_PLACEHOLDER %t.out
// RUN: %CPU_RUN_PLACEHOLDER %t.out
// RUN: %GPU_RUN_PLACEHOLDER %t.out
//
Expand Down Expand Up @@ -58,7 +57,6 @@ template <typename T> class CustomAllocator {
int main() {
TestQueue Queue1(sycl::default_selector{});
TestQueue Queue2(sycl::default_selector{});
TestQueue Queue3(sycl::host_selector{});

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

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

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

Queue3.submit([&](sycl::handler &CGH) {
auto BufAcc = Buf.get_access<sycl_access_mode::read_write>(CGH);
CGH.single_task<class third_kernel>([=]() { BufAcc[0] = 43; });
});

Queue3.wait_and_throw();

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

return 0;
}
1 change: 0 additions & 1 deletion SYCL/Scheduler/InOrderQueueDeps.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
// RUN: env %HOST_RUN_PLACEHOLDER %t.out
// RUN: env SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out 2>&1 %CPU_CHECK_PLACEHOLDER
// RUN: env SYCL_PI_TRACE=2 %GPU_RUN_PLACEHOLDER %t.out 2>&1 %GPU_CHECK_PLACEHOLDER
// RUN: env SYCL_PI_TRACE=2 %ACC_RUN_PLACEHOLDER %t.out 2>&1 %ACC_CHECK_PLACEHOLDER
Expand Down
28 changes: 1 addition & 27 deletions SYCL/Scheduler/MemObjRemapping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,10 @@ int main() {
std::size_t Size = 64;
range<1> Range{Size};
buffer<int, 1> BufA{Range};
buffer<int, 1> BufB{Range};

Q.submit([&](handler &Cgh) {
auto AccA = BufA.get_access<access::mode::read_write>(Cgh);
auto AccB = BufB.get_access<access::mode::read_write>(Cgh);
Cgh.parallel_for<Foo>(Range, [=](id<1> Idx) {
AccA[Idx] = Idx[0];
AccB[Idx] = Idx[0];
});
Cgh.parallel_for<Foo>(Range, [=](id<1> Idx) { AccA[Idx] = Idx[0]; });
});

{
Expand All @@ -39,16 +34,9 @@ int main() {
// CHECK-NEXT: :
// CHECK-NEXT: :
// CHECK-NEXT: : 1
// CHECK: piEnqueueMemBufferMap
// CHECK-NEXT: :
// CHECK-NEXT: :
// CHECK-NEXT: :
// CHECK-NEXT: : 1
auto AccA = BufA.get_access<access::mode::read>();
auto AccB = BufB.get_access<access::mode::read>();
for (std::size_t I = 0; I < Size; ++I) {
assert(AccA[I] == I);
assert(AccB[I] == I);
}
}
{
Expand All @@ -63,23 +51,9 @@ int main() {
AccA[I] = 2 * I;
}

queue HostQ{host_selector()};
// CHECK: piEnqueueMemUnmap
// CHECK: piEnqueueMemBufferMap
// CHECK-NEXT: :
// CHECK-NEXT: :
// CHECK-NEXT: :
// CHECK-NEXT: : 3
HostQ.submit([&](handler &Cgh) {
auto AccB = BufB.get_access<access::mode::write>(Cgh);
Cgh.parallel_for<Bar>(Range, [=](id<1> Idx) { AccB[Idx] = 2 * Idx[0]; });
});

// CHECK-NOT: piEnqueueMemBufferMap
auto AccA = BufA.get_access<access::mode::read>();
auto AccB = BufB.get_access<access::mode::read>();
for (std::size_t I = 0; I < Size; ++I) {
assert(AccA[I] == 2 * I);
assert(AccB[I] == 2 * I);
}
}
27 changes: 0 additions & 27 deletions SYCL/Scheduler/MultipleDevices.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,27 +93,10 @@ int multidevice_test(queue MyQueue1, queue MyQueue2) {
}

int main() {
host_selector hostSelector;
cpu_selector CPUSelector;
gpu_selector GPUSelector;

int Result = -1;
try {
queue MyQueue1(hostSelector);
queue MyQueue2(hostSelector);
Result &= multidevice_test(MyQueue1, MyQueue2);
} catch (sycl::runtime_error &) {
std::cout << "Skipping host and host" << std::endl;
}

try {
queue MyQueue1(hostSelector);
queue MyQueue2(CPUSelector);
Result &= multidevice_test(MyQueue1, MyQueue2);
} catch (sycl::runtime_error &) {
std::cout << "Skipping host and CPU" << std::endl;
}

try {
queue MyQueue1(CPUSelector);
queue MyQueue2(CPUSelector);
Expand All @@ -132,16 +115,6 @@ int main() {
std::cout << "Skipping CPU and GPU" << std::endl;
}

try {
queue MyQueue1(hostSelector);
queue MyQueue2(GPUSelector);
Result &= multidevice_test(MyQueue1, MyQueue2);
} catch (sycl::runtime_error &) {
std::cout << "Skipping host and GPU" << std::endl;
} catch (sycl::compile_program_error &) {
std::cout << "Skipping CPU and GPU" << std::endl;
}

try {
queue MyQueue1(GPUSelector);
queue MyQueue2(GPUSelector);
Expand Down
1 change: 0 additions & 1 deletion SYCL/Scheduler/ReleaseResourcesTest.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -fsycl-dead-args-optimization %s -o %t.out
// RUN: env %HOST_RUN_PLACEHOLDER %t.out
// RUN: env SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out 2>&1 %CPU_CHECK_PLACEHOLDER
// RUN: env SYCL_PI_TRACE=2 %GPU_RUN_PLACEHOLDER %t.out 2>&1 %GPU_CHECK_PLACEHOLDER
// RUN: env SYCL_PI_TRACE=2 %ACC_RUN_PLACEHOLDER %t.out 2>&1 %ACC_CHECK_PLACEHOLDER
Expand Down