Skip to content

Commit 07f682e

Browse files
committed
[SYCL][CUDA] Refine LIT sub-group extension tests
Mark tests that fail with CUDA as XFAIL. Tests that pass due to detection that the sub-group extension is not supported are run normally. The above should lead to passing test or unexpected failures the moment work on sub-groups for CUDA would start, and therefore reminds us automatically to revisit the LIT tests. Signed-off-by: Bjoern Knafla <[email protected]>
1 parent b88cd76 commit 07f682e

File tree

12 files changed

+26
-11
lines changed

12 files changed

+26
-11
lines changed

sycl/test/linear_id/linear-sub_group.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsycl %s -o %t.out
1+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
22
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
33
// RUN: %CPU_RUN_PLACEHOLDER %t.out
44
// RUN: %GPU_RUN_PLACEHOLDER %t.out

sycl/test/sub_group/attributes.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsycl %s -o %t.out
1+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
22
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
33
// RUN: %CPU_RUN_PLACEHOLDER %t.out
44
// RUNx: %GPU_RUN_PLACEHOLDER %t.out

sycl/test/sub_group/barrier.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// RUN: %CPU_RUN_PLACEHOLDER %t.out
44
// RUN: %GPU_RUN_PLACEHOLDER %t.out
55
// RUN: %ACC_RUN_PLACEHOLDER %t.out
6-
// UNSUPPORTED: cuda
6+
77
//==---------- barrier.cpp - SYCL sub_group barrier test -------*- C++ -*---==//
88
//
99
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.

sycl/test/sub_group/broadcast.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
// XFAIL: cuda
2+
// CUDA compilation and runtime do not yet support sub groups.
3+
4+
15
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
26
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -D SG_GPU %s -o %t_gpu.out
37
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
48
// RUN: %CPU_RUN_PLACEHOLDER %t.out
59
// RUN: %GPU_RUN_PLACEHOLDER %t_gpu.out
610
// RUN: %ACC_RUN_PLACEHOLDER %t.out
7-
// UNSUPPORTED: cuda
11+
812
//==--------- broadcast.cpp - SYCL sub_group broadcast test ----*- C++ -*---==//
913
//
1014
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.

sycl/test/sub_group/common.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// RUN: %CPU_RUN_PLACEHOLDER %t.out
44
// RUN: %GPU_RUN_PLACEHOLDER %t.out
55
// RUN: %ACC_RUN_PLACEHOLDER %t.out
6-
// UNSUPPORTED: cuda
6+
77
//==-------------- common.cpp - SYCL sub_group common test -----*- C++ -*---==//
88
//
99
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.

sycl/test/sub_group/common_ocl.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// REQUIRES: opencl
22
// UNSUPPORTED: cuda
33
// CUDA does not support OpenCL interop.
4+
// CUDA compilation and runtime do not yet support sub groups.
45

56
// RUN: %clang_cc1 -x cl -cl-std=CL2.0 %S/sg.cl -triple spir64-unknown-unknown -emit-llvm-bc -o %T/kernel_ocl.bc -include opencl-c.h
67
// RUN: llvm-spirv %T/kernel_ocl.bc -o %T/kernel_ocl.spv

sycl/test/sub_group/info.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
// REQUIRES: opencl
12
// UNSUPPORTED: cuda
3+
// CUDA does not support OpenCL interop.
4+
// CUDA compilation and runtime do not yet support sub groups.
25

36
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
47
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out

sycl/test/sub_group/load_store.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// XFAIL: cuda
2+
// CUDA compilation and runtime do not yet support sub groups.
3+
14
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
25
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
36
// RUN: %CPU_RUN_PLACEHOLDER %t.out

sycl/test/sub_group/reduce.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
1+
// XFAIL: cuda
2+
// CUDA compilation and runtime do not yet support sub groups.
23

34
//-fsycl-targets=%sycl_triple
45
// RUN: %clangxx -fsycl -std=c++14 %s -o %t.out
5-
// RUN: %clangxx -fsycl -std=c++14 -D SG_GPU %s -o %t_gpu.out
6+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -std=c++14 -D SG_GPU %s -o %t_gpu.out
67
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
78
// RUN: %CPU_RUN_PLACEHOLDER %t.out
89
// RUN: %GPU_RUN_PLACEHOLDER %t_gpu.out

sycl/test/sub_group/scan.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
1+
// XFAIL: cuda
2+
// CUDA compilation and runtime do not yet support sub groups.
23

34
//-fsycl-targets=%sycl_triple
45
// RUN: %clangxx -fsycl -std=c++14 %s -o %t.out
5-
// RUN: %clangxx -fsycl -std=c++14 -D SG_GPU %s -o %t_gpu.out
6+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -std=c++14 -D SG_GPU %s -o %t_gpu.out
67
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
78
// RUN: %CPU_RUN_PLACEHOLDER %t.out
89
// RUN: %GPU_RUN_PLACEHOLDER %t_gpu.out

sycl/test/sub_group/shuffle.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
1+
// XFAIL: cuda
2+
// CUDA compilation and runtime do not yet support sub groups.
23

34
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
45
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out

sycl/test/sub_group/vote.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
1+
// XFAIL: cuda
2+
// CUDA compilation and runtime do not yet support sub groups.
23

34
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
45
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out

0 commit comments

Comments
 (0)