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

Commit bfd61bb

Browse files
[SYCL] Remove host run and dependencies from SYCL/USM tests (#1221)
This commit removes the host run and any assumptions and operations related to the host device from the tests in SYCL/USM. Co-authored-by: Sachkov, Alexey <[email protected]> Signed-off-by: Larsen, Steffen <[email protected]>
1 parent 4a7aa37 commit bfd61bb

37 files changed

+13
-72
lines changed

SYCL/USM/alloc_functions.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 %t1.out
2-
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
32
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
43
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
54
// RUN: %ACC_RUN_PLACEHOLDER %t1.out

SYCL/USM/allocator_container.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 %t1.out
2-
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
32
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
43
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
54
// RUN: %ACC_RUN_PLACEHOLDER %t1.out

SYCL/USM/allocator_equal.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 %t1.out
2-
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
32
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
43
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
54
// RUN: %ACC_RUN_PLACEHOLDER %t1.out

SYCL/USM/allocator_rebind.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 %t1.out
2-
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
32
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
43
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
54
// RUN: %ACC_RUN_PLACEHOLDER %t1.out

SYCL/USM/allocator_shared.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 %t1.out
2-
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
32
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
43
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
54
// RUN: %ACC_RUN_PLACEHOLDER %t1.out

SYCL/USM/allocator_vector.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 %t1.out
2-
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
32
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
43
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
54
// RUN: %ACC_RUN_PLACEHOLDER %t1.out

SYCL/USM/badmalloc.cpp

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

SYCL/USM/buffer_location.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 %t1.out
2-
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
32
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
43
// RUN: %ACC_RUN_PLACEHOLDER %t1.out
54

SYCL/USM/copy.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
//===----------------------------------------------------------------------===//
88
//
99
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out
10-
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
1110
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
1211
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
1312
// RUN: %ACC_RUN_PLACEHOLDER %t1.out

SYCL/USM/dep_events.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
// UNSUPPORTED: cuda && windows
1212
//
1313
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out
14-
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
1514
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
1615
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
1716
// RUN: %ACC_RUN_PLACEHOLDER %t1.out

SYCL/USM/depends_on.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 %t1.out
2-
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
32
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
43
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
54
// RUN: %ACC_RUN_PLACEHOLDER %t1.out

SYCL/USM/dmem_varied.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 %t1.out
2-
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
32
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
43
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
54
// RUN: %ACC_RUN_PLACEHOLDER %t1.out

SYCL/USM/dmemll.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 %t1.out
2-
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
32
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
43
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
54
// RUN: %ACC_RUN_PLACEHOLDER %t1.out

SYCL/USM/dmemllaligned.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 %t1.out
2-
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
32
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
43
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
54
// RUN: %ACC_RUN_PLACEHOLDER %t1.out

SYCL/USM/fill.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
//===----------------------------------------------------------------------===//
88
//
99
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out
10-
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
1110
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
1211
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
1312
// RUN: %ACC_RUN_PLACEHOLDER %t1.out

SYCL/USM/free_during_kernel_execution.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
//===----------------------------------------------------------------------===//
88
//
99
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out
10-
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
1110
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
1211
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
1312
// RUN: %ACC_RUN_PLACEHOLDER %t1.out

SYCL/USM/hmemll.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 %t1.out
2-
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
32
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
43
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
54
// RUN: %ACC_RUN_PLACEHOLDER %t1.out

SYCL/USM/hmemllaligned.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 %t1.out
2-
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
32
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
43
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
54
// RUN: %ACC_RUN_PLACEHOLDER %t1.out

SYCL/USM/math.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

54
// REQUIRES: cpu

SYCL/USM/memadvise.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 %t1.out
2-
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
32
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
43
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
54
// RUN: %ACC_RUN_PLACEHOLDER %t1.out

SYCL/USM/memadvise_cuda.cpp

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

SYCL/USM/memcpy.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
//===----------------------------------------------------------------------===//
88
//
99
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out
10-
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
1110
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
1211
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
1312
// RUN: %ACC_RUN_PLACEHOLDER %t1.out

SYCL/USM/memset.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 %t1.out
2-
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
32
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
43
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
54
// RUN: %ACC_RUN_PLACEHOLDER %t1.out

SYCL/USM/mixed.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 %t1.out
2-
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
32
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
43
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
54
// RUN: %ACC_RUN_PLACEHOLDER %t1.out

SYCL/USM/mixed2.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 %t1.out
2-
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
32
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
43
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
54
// RUN: %ACC_RUN_PLACEHOLDER %t1.out

SYCL/USM/mixed2template.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 %t1.out
2-
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
32
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
43
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
54
// RUN: %ACC_RUN_PLACEHOLDER %t1.out

SYCL/USM/mixed_queue.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 %t1.out
2-
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
32
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
43
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
54
// RUN: %ACC_RUN_PLACEHOLDER %t1.out

SYCL/USM/pfor_flatten.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-unnamed-lambda -fsycl-dead-args-optimization %s -o %t1.out
2-
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
32
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
43
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
54
// RUN: %ACC_RUN_PLACEHOLDER %t1.out

SYCL/USM/pfor_flatten_range_shortcut.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-unnamed-lambda %s -o %t1.out
2-
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
32
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
43
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
54
// RUN: %ACC_RUN_PLACEHOLDER %t1.out

SYCL/USM/pointer_query.cpp

Lines changed: 12 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// RUN: %clangxx -fsycl %s -o %t1.out
2-
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
32
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
43
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
54
// RUN: %ACC_RUN_PLACEHOLDER %t1.out
@@ -36,16 +35,8 @@ int main() {
3635
return 1;
3736
}
3837
Kind = get_pointer_type(array, ctxt);
39-
if (ctxt.is_host()) {
40-
// for now, host device treats all allocations
41-
// as host allocations
42-
if (Kind != usm::alloc::host) {
43-
return 2;
44-
}
45-
} else {
46-
if (Kind != usm::alloc::device) {
47-
return 3;
48-
}
38+
if (Kind != usm::alloc::device) {
39+
return 3;
4940
}
5041
device D = get_pointer_device(array, ctxt);
5142
if (D != dev) {
@@ -59,16 +50,8 @@ int main() {
5950
return 5;
6051
}
6152
Kind = get_pointer_type(array, ctxt);
62-
if (ctxt.is_host()) {
63-
// for now, host device treats all allocations
64-
// as host allocations
65-
if (Kind != usm::alloc::host) {
66-
return 6;
67-
}
68-
} else {
69-
if (Kind != usm::alloc::shared) {
70-
return 7;
71-
}
53+
if (Kind != usm::alloc::shared) {
54+
return 7;
7255
}
7356
D = get_pointer_device(array, ctxt);
7457
if (D != dev) {
@@ -103,22 +86,15 @@ int main() {
10386
// next checks only valid for non-host contexts
10487
array = (int *)malloc(N * sizeof(int));
10588
Kind = get_pointer_type(array, ctxt);
106-
if (!ctxt.is_host()) {
107-
if (Kind != usm::alloc::unknown) {
108-
return 12;
109-
}
110-
try {
111-
D = get_pointer_device(array, ctxt);
112-
} catch (runtime_error) {
113-
return 0;
114-
}
115-
return 13;
116-
} else {
117-
// host ctxts always report host
118-
if (Kind != usm::alloc::host) {
119-
return 14;
120-
}
89+
if (Kind != usm::alloc::unknown) {
90+
return 12;
91+
}
92+
try {
93+
D = get_pointer_device(array, ctxt);
94+
} catch (runtime_error) {
95+
return 0;
12196
}
97+
return 13;
12298
free(array);
12399

124100
return 0;

SYCL/USM/prefetch.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
// UNSUPPORTED: cuda && windows
1212
//
1313
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out
14-
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
1514
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
1615
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
1716
// RUN: %ACC_RUN_PLACEHOLDER %t1.out

SYCL/USM/queue_wait.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/USM/smem_concurrent.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 %t1.out
2-
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
32
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
43
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
54
// RUN: %ACC_RUN_PLACEHOLDER %t1.out

SYCL/USM/smem_varied.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 %t1.out -DTEST_SHARED
2-
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
32
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
43
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
54
// RUN: %ACC_RUN_PLACEHOLDER %t1.out

SYCL/USM/smemll.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 %t1.out
2-
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
32
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
43
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
54
// RUN: %ACC_RUN_PLACEHOLDER %t1.out

SYCL/USM/smemllaligned.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 %t1.out
2-
// RUN: %HOST_RUN_PLACEHOLDER %t1.out
32
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
43
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
54
// RUN: %ACC_RUN_PLACEHOLDER %t1.out

SYCL/USM/usm_pooling.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ int main(int argc, char *argv[]) {
8080
device D = Q.get_device();
8181
context C = Q.get_context();
8282

83-
const char *devType = D.is_host() ? "Host" : D.is_cpu() ? "CPU" : "GPU";
83+
const char *devType = D.is_cpu() ? "CPU" : "GPU";
8484
std::string pluginName =
8585
D.get_platform().get_info<sycl::info::platform::name>();
8686
std::cout << "Running on device " << devType << " ("

0 commit comments

Comments
 (0)