Skip to content

Commit 9bcf257

Browse files
authored
[SYCL][NFC] Organize target tests for to better match requirements (#11761)
The target mismatch test for the driver threw all targets into a single test. This causes issues on dependencies based on AMD and Nvidia targets. Split those tests out and mark with the approriate requirement.
1 parent f634cc9 commit 9bcf257

File tree

3 files changed

+55
-53
lines changed

3 files changed

+55
-53
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// REQUIRES: amdgpu-registered-target
2+
3+
// RUN: %clangxx -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx906 -nogpulib\
4+
// RUN: %S/Inputs/SYCL/libamdgcn-gfx908.a -### %s 2>&1 \
5+
// RUN: | FileCheck %s -check-prefix=AMDGCN_DIAG
6+
// RUN: %clangxx -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx906 -nogpulib\
7+
// RUN: -L%S/Inputs/SYCL -lamdgcn-gfx908 -### %s 2>&1 \
8+
// RUN: | FileCheck %s -check-prefix=AMDGCN_DIAG
9+
// RUN: %clangxx -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx906 -nogpulib\
10+
// RUN: %S/Inputs/SYCL/objamdgcn-gfx908.o -### %s 2>&1 \
11+
// RUN: | FileCheck %s -check-prefix=AMDGCN_DIAG
12+
// AMDGCN_DIAG: linked binaries do not contain expected 'amdgcn-amd-amdhsa-gfx906' target; found targets: 'amdgcn-amd-amdhsa-gfx908' [-Wsycl-target]
13+
14+
// RUN: %clangxx -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx908 -nogpulib\
15+
// RUN: %S/Inputs/SYCL/libamdgcn-gfx908.a -### %s 2>&1 \
16+
// RUN: | FileCheck %s -check-prefix=AMDGCN_MATCH_DIAG
17+
// RUN: %clangxx -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx908 -nogpulib\
18+
// RUN: -L%S/Inputs/SYCL -lamdgcn-gfx908 -### %s 2>&1 \
19+
// RUN: | FileCheck %s -check-prefix=AMDGCN_MATCH_DIAG
20+
// RUN: %clangxx -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx908 -nogpulib\
21+
// RUN: %S/Inputs/SYCL/objamdgcn-gfx908.o -### %s 2>&1 \
22+
// RUN: | FileCheck %s -check-prefix=AMDGCN_MATCH_DIAG
23+
// RUN: %clangxx -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx906 -nogpulib\
24+
// RUN: -Wno-sycl-target %S/Inputs/SYCL/objamdgcn-gfx908.o -### %s 2>&1 \
25+
// RUN: | FileCheck %s -check-prefix=AMDGCN_MATCH_DIAG
26+
// AMDGCN_MATCH_DIAG-NOT: linked binaries do not contain expected
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// REQUIRES: nvptx-registered-target
2+
3+
// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_60 \
4+
// RUN: %S/Inputs/SYCL/libnvptx64-sm_50.a -### %s 2>&1 \
5+
// RUN: | FileCheck %s -check-prefix=NVPTX64_DIAG
6+
// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_60 \
7+
// RUN: -L%S/Inputs/SYCL -lnvptx64-sm_50 -### %s 2>&1 \
8+
// RUN: | FileCheck %s -check-prefix=NVPTX64_DIAG
9+
// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_60 \
10+
// RUN: %S/Inputs/SYCL/objnvptx64-sm_50.o -### %s 2>&1 \
11+
// RUN: | FileCheck %s -check-prefix=NVPTX64_DIAG
12+
// NVPTX64_DIAG: linked binaries do not contain expected 'nvptx64-nvidia-cuda-sm_60' target; found targets: 'nvptx64-nvidia-cuda-sm_50' [-Wsycl-target]
13+
14+
// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_50 \
15+
// RUN: %S/Inputs/SYCL/libnvptx64-sm_50.a -### %s 2>&1 \
16+
// RUN: | FileCheck %s -check-prefix=NVPTX64_MATCH_DIAG
17+
// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_50 \
18+
// RUN: -L%S/Inputs/SYCL -lnvptx64-sm_50 -### %s 2>&1 \
19+
// RUN: | FileCheck %s -check-prefix=NVPTX64_MATCH_DIAG
20+
// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_50 \
21+
// RUN: %S/Inputs/SYCL/objnvptx64-sm_50.o -### %s 2>&1 \
22+
// RUN: | FileCheck %s -check-prefix=NVPTX64_MATCH_DIAG
23+
// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda \
24+
// RUN: %S/Inputs/SYCL/objnvptx64-sm_50.o -### %s 2>&1 \
25+
// RUN: | FileCheck %s -check-prefix=NVPTX64_MATCH_DIAG
26+
// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_60 \
27+
// RUN: -Wno-sycl-target %S/Inputs/SYCL/objnvptx64-sm_50.o -### %s 2>&1 \
28+
// RUN: | FileCheck %s -check-prefix=NVPTX64_MATCH_DIAG
29+
// NVPTX64_MATCH_DIAG-NOT: linked binaries do not contain expected

clang/test/Driver/sycl-target-mismatch.cpp

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -23,56 +23,3 @@
2323
// RUN: -Wno-sycl-target -### %s 2>&1 \
2424
// RUN: | FileCheck %s -check-prefix=SPIR64_DIAG
2525
// SPIR64_DIAG-NOT: linked binaries do not contain expected
26-
27-
// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_60 \
28-
// RUN: %S/Inputs/SYCL/libnvptx64-sm_50.a -### %s 2>&1 \
29-
// RUN: | FileCheck %s -check-prefix=NVPTX64_DIAG
30-
// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_60 \
31-
// RUN: -L%S/Inputs/SYCL -lnvptx64-sm_50 -### %s 2>&1 \
32-
// RUN: | FileCheck %s -check-prefix=NVPTX64_DIAG
33-
// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_60 \
34-
// RUN: %S/Inputs/SYCL/objnvptx64-sm_50.o -### %s 2>&1 \
35-
// RUN: | FileCheck %s -check-prefix=NVPTX64_DIAG
36-
// NVPTX64_DIAG: linked binaries do not contain expected 'nvptx64-nvidia-cuda-sm_60' target; found targets: 'nvptx64-nvidia-cuda-sm_50' [-Wsycl-target]
37-
38-
// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_50 \
39-
// RUN: %S/Inputs/SYCL/libnvptx64-sm_50.a -### %s 2>&1 \
40-
// RUN: | FileCheck %s -check-prefix=NVPTX64_MATCH_DIAG
41-
// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_50 \
42-
// RUN: -L%S/Inputs/SYCL -lnvptx64-sm_50 -### %s 2>&1 \
43-
// RUN: | FileCheck %s -check-prefix=NVPTX64_MATCH_DIAG
44-
// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_50 \
45-
// RUN: %S/Inputs/SYCL/objnvptx64-sm_50.o -### %s 2>&1 \
46-
// RUN: | FileCheck %s -check-prefix=NVPTX64_MATCH_DIAG
47-
// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda \
48-
// RUN: %S/Inputs/SYCL/objnvptx64-sm_50.o -### %s 2>&1 \
49-
// RUN: | FileCheck %s -check-prefix=NVPTX64_MATCH_DIAG
50-
// RUN: %clangxx -fsycl -nocudalib -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_60 \
51-
// RUN: -Wno-sycl-target %S/Inputs/SYCL/objnvptx64-sm_50.o -### %s 2>&1 \
52-
// RUN: | FileCheck %s -check-prefix=NVPTX64_MATCH_DIAG
53-
// NVPTX64_MATCH_DIAG-NOT: linked binaries do not contain expected
54-
55-
// RUN: %clangxx -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx906 -nogpulib\
56-
// RUN: %S/Inputs/SYCL/libamdgcn-gfx908.a -### %s 2>&1 \
57-
// RUN: | FileCheck %s -check-prefix=AMDGCN_DIAG
58-
// RUN: %clangxx -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx906 -nogpulib\
59-
// RUN: -L%S/Inputs/SYCL -lamdgcn-gfx908 -### %s 2>&1 \
60-
// RUN: | FileCheck %s -check-prefix=AMDGCN_DIAG
61-
// RUN: %clangxx -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx906 -nogpulib\
62-
// RUN: %S/Inputs/SYCL/objamdgcn-gfx908.o -### %s 2>&1 \
63-
// RUN: | FileCheck %s -check-prefix=AMDGCN_DIAG
64-
// AMDGCN_DIAG: linked binaries do not contain expected 'amdgcn-amd-amdhsa-gfx906' target; found targets: 'amdgcn-amd-amdhsa-gfx908' [-Wsycl-target]
65-
66-
// RUN: %clangxx -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx908 -nogpulib\
67-
// RUN: %S/Inputs/SYCL/libamdgcn-gfx908.a -### %s 2>&1 \
68-
// RUN: | FileCheck %s -check-prefix=AMDGCN_MATCH_DIAG
69-
// RUN: %clangxx -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx908 -nogpulib\
70-
// RUN: -L%S/Inputs/SYCL -lamdgcn-gfx908 -### %s 2>&1 \
71-
// RUN: | FileCheck %s -check-prefix=AMDGCN_MATCH_DIAG
72-
// RUN: %clangxx -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx908 -nogpulib\
73-
// RUN: %S/Inputs/SYCL/objamdgcn-gfx908.o -### %s 2>&1 \
74-
// RUN: | FileCheck %s -check-prefix=AMDGCN_MATCH_DIAG
75-
// RUN: %clangxx -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx906 -nogpulib\
76-
// RUN: -Wno-sycl-target %S/Inputs/SYCL/objamdgcn-gfx908.o -### %s 2>&1 \
77-
// RUN: | FileCheck %s -check-prefix=AMDGCN_MATCH_DIAG
78-
// AMDGCN_MATCH_DIAG-NOT: linked binaries do not contain expected

0 commit comments

Comments
 (0)