Skip to content

Commit c2bb96b

Browse files
committed
[SYCL][CUDA] Triage and clean LIT
Fix some lit tests failing for CUDA by providing the -fsycl-targets parameter. Mark LIT tests failing due to features unsupported by CUDA as UNSUPPORTED instead of XFAIL. Signed-off-by: Bjoern Knafla <bjoern@codeplay.com>
1 parent 1a5165e commit c2bb96b

17 files changed

+55
-42
lines changed

sycl/test/basic_tests/image.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1+
// UNSUPPORTED: cuda
2+
// CUDA cannot support SYCL 1.2.1 images.
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
47
// RUN: %GPU_RUN_PLACEHOLDER %t.out
58

6-
// TODO: No CUDA image support
7-
// TODO: ptxas fatal : Unresolved extern function '_Z17__spirv_ImageReadIDv4_f14ocl_image2d_roDv2_iET_T0_T1_'
8-
// XFAIL: cuda
9-
109
//==------------------- image.cpp - SYCL image basic test -----------------==//
1110
//
1211
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.

sycl/test/basic_tests/image_accessor_readsampler.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
// RUN: %clangxx -fsycl %s -o %t.out
1+
// UNSUPPORTED: cuda
2+
// CUDA cannot support SYCL 1.2.1 images.
3+
//
4+
// 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
47
// RUN: %GPU_RUN_PLACEHOLDER %t.out
5-
// REQUIRES: opencl
68
//==------------------- image_accessor_readsampler.cpp ---------------------==//
79
//==-----------------image_accessor read API test with sampler--------------==//
810
//

sycl/test/basic_tests/image_accessor_readwrite.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
// RUN: %clangxx -fsycl %s -o %t.out
1+
// UNSUPPORTED: cuda
2+
// CUDA cannot support SYCL 1.2.1 images.
3+
//
4+
// 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
47
// RUN: %GPU_RUN_PLACEHOLDER %t.out
58

6-
// UNSUPPORTED: cuda
79
//==--------------------image_accessor_readwrite.cpp ----------------------==//
810
//==----------image_accessor read without sampler & write API test---------==//
911
//

sycl/test/basic_tests/image_accessor_readwrite_half.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
// RUN: %clangxx -fsycl %s -o %t.out
1+
// UNSUPPORTED: cuda
2+
// CUDA cannot support SYCL 1.2.1 images.
3+
//
4+
// 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
47
// RUN: %GPU_RUN_PLACEHOLDER %t.out
58

6-
// UNSUPPORTED: cuda
79
//==--------------------image_accessor_readwrite_half.cpp -------------------==//
810
//==-image_accessor read (without sampler)& write API test for half datatype-==//
911
//

sycl/test/basic_tests/image_array.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1+
// UNSUPPORTED: cuda
2+
// CUDA cannot support SYCL 1.2.1 images.
3+
//
14
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
25
// RUNx: env SYCL_DEVICE_TYPE=HOST %t.out
36
// RUN: %CPU_RUN_PLACEHOLDER %t.out
47
// RUNx: %GPU_RUN_PLACEHOLDER %t.out
58

6-
// TODO: No CUDA image support
7-
// TODO: ptxas fatal : Unresolved extern function '_Z17__spirv_ImageReadIDv4_f14ocl_image2d_roDv2_iET_T0_T1_'
8-
// XFAIL: cuda
9-
109
//==------------------- image.cpp - SYCL image basic test -----------------==//
1110
//
1211
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.

sycl/test/basic_tests/image_constructors.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// UNSUPPORTED: cuda
2+
// CUDA cannot support SYCL 1.2.1 images.
3+
//
14
// RUN: %clangxx %s -o %t1.out -lsycl -I %sycl_include
25
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
36
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t2.out

sycl/test/basic_tests/stream/auto_flush.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
// RUN: %clangxx -fsycl %s -o %t.out
1+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
22
// TODO: Enable on host when commands cleanup will be implemented in scheduler
33
// RUN: %CPU_RUN_PLACEHOLDER %t.out %CPU_CHECK_PLACEHOLDER
44
// RUN: %GPU_RUN_ON_LINUX_PLACEHOLDER %t.out %GPU_CHECK_ON_LINUX_PLACEHOLDER
55
// RUN: %ACC_RUN_PLACEHOLDER %t.out %ACC_CHECK_PLACEHOLDER
6-
// XFAIL: cuda
7-
// cuda fail due to unimplemented param_name 4131 in cuda_piDeviceGetInfo
86
//==-------------- copy.cpp - SYCL stream obect auto flushing test ---------==//
97
//
108
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.

sycl/test/built-ins/printf.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
// RUN: %clangxx -fsycl %s -o %t.out
1+
// UNSUPPORTED: cuda
2+
// CUDA does not support printf.
3+
//
4+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
25
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out | FileCheck %s
36
// RUN: %CPU_RUN_PLACEHOLDER %t.out %CPU_CHECK_PLACEHOLDER
47
// RUN: %GPU_RUN_PLACEHOLDER %t.out %GPU_CHECK_PLACEHOLDER
58
// RUN: %ACC_RUN_PLACEHOLDER %t.out %ACC_CHECK_PLACEHOLDER
69

7-
// XFAIL: cuda
8-
910
#include <CL/sycl.hpp>
1011

1112
#include <cstdint>

sycl/test/device-code-split/aot-gpu.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
// REQUIRES: ocloc, gpu
2-
3-
// RUN: %clangxx -fsycl -fsycl-device-code-split=per_source -fsycl-targets=spir64_gen-unknown-unknown-sycldevice -Xsycl-target-backend=spir64_gen-unknown-unknown-sycldevice "-device skl" -I %S/Inputs -o %t.out %S/split-per-source-main.cpp %S/Inputs/split-per-source-second-file.cpp
2+
// UNSUPPORTED: cuda
3+
// CUDA does neither support device code splitting nor SPIR.
4+
//
5+
// RUN: %clangxx -fsycl -fsycl-device-code-split=per_source \
6+
// RUN: -fsycl-targets=spir64_gen-unknown-unknown-sycldevice \
7+
// RUN: -Xsycl-target-backend=spir64_gen-unknown-unknown-sycldevice \
8+
// RUN: "-device skl" -I %S/Inputs -o %t.out \
9+
// RUN: %S/split-per-source-main.cpp \
10+
// RUN: %S/Inputs/split-per-source-second-file.cpp
411
// RUN: %GPU_RUN_PLACEHOLDER %t.out
5-
6-
// XFAIL: cuda

sycl/test/device-code-split/split-per-kernel.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
// RUN: %clangxx -fsycl -fsycl-device-code-split=per_kernel -o %t.out %s
1+
// UNSUPPORTED: cuda
2+
// CUDA does not support device code splitting.
3+
//
4+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -fsycl-device-code-split=per_kernel -o %t.out %s
25
// RUN: %CPU_RUN_PLACEHOLDER %t.out
36
// RUN: %GPU_RUN_PLACEHOLDER %t.out
47
// RUN: %ACC_RUN_PLACEHOLDER %t.out
58

6-
// XFAIL: cuda
7-
89
#include <CL/sycl.hpp>
910

1011
class Kern1;

sycl/test/device-code-split/split-per-source-main.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
// RUN: %clangxx -fsycl -fsycl-device-code-split=per_source -I %S/Inputs -o %t.out %s %S/Inputs/split-per-source-second-file.cpp
1+
// UNSUPPORTED: cuda
2+
// CUDA does not support device code splitting.
3+
//
4+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -fsycl-device-code-split=per_source -I %S/Inputs -o %t.out %s %S/Inputs/split-per-source-second-file.cpp
25
// RUN: %CPU_RUN_PLACEHOLDER %t.out
36
// RUN: %GPU_RUN_PLACEHOLDER %t.out
47
// RUN: %ACC_RUN_PLACEHOLDER %t.out
58

6-
// XFAIL: cuda
7-
89
#include "Inputs/split-per-source.h"
910

1011
int main () {

sycl/test/ordered_queue/oq_kernels.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
// RUN: %clangxx -fsycl -fsycl-unnamed-lambda %s -o %t.out
1+
// UNSUPPORTED: cuda
2+
// CUDA does not support unnamed lambdas.
3+
//
4+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -fsycl-unnamed-lambda %s -o %t.out
25
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
36
// RUN: %ACC_RUN_PLACEHOLDER %t.out
47
// RUN: %CPU_RUN_PLACEHOLDER %t.out
58
// RUN: %GPU_RUN_PLACEHOLDER %t.out
6-
// XFAIL: cuda
79

810
//==------ oq_kernels.cpp - SYCL ordered queue kernel shortcut test --------==//
911
//

sycl/test/ordered_queue/ordered_buffs.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
// REQUIRES: opencl
22

3-
// RUN: %clangxx -fsycl %s -o %t.out -L %opencl_libs_dir -lOpenCL
3+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -L %opencl_libs_dir -lOpenCL
44
// RUN: %ACC_RUN_PLACEHOLDER %t.out
55
// RUN: %CPU_RUN_PLACEHOLDER %t.out
66
// RUN: %GPU_RUN_PLACEHOLDER %t.out
7-
// XFAIL: cuda
87
//==-------- ordered_buffs.cpp - SYCL buffers in ordered queues test--------==//
98
//
109
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.

sycl/test/ordered_queue/ordered_dmemll.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// REQUIRES: opencl
22

3-
// RUN: %clangxx -fsycl %s -o %t1.out -L %opencl_libs_dir -lOpenCL
3+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out -L %opencl_libs_dir -lOpenCL
44
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
55
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
66
//==----------- ordered_dmemll.cpp - Device Memory Linked List test --------==//

sycl/test/ordered_queue/ordered_queue.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// REQUIRES: opencl
22
//
3-
// RUN: %clangxx -fsycl %s -o %t.out -L %opencl_libs_dir -lOpenCL
3+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -L %opencl_libs_dir -lOpenCL
44
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
55
//==---------- ordered_queue.cpp - SYCL ordered queue test -----------------==//
66
//

sycl/test/ordered_queue/prop.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// REQUIRES: opencl
22

3-
// RUN: %clangxx -fsycl %s -o %t1.out -L %opencl_libs_dir -lOpenCL
3+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out -L %opencl_libs_dir -lOpenCL
44
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
55
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
66

sycl/test/separate-compile/sycl-external.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Test1 - check that kernel can call a SYCL_EXTERNAL function defined in a
22
// different object file.
3-
// RUN: %clangxx -fsycl -DSOURCE1 -c %s -o %t1.o
4-
// RUN: %clangxx -fsycl -DSOURCE2 -c %s -o %t2.o
5-
// RUN: %clangxx -fsycl %t1.o %t2.o -o %t.exe
3+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -DSOURCE1 -c %s -o %t1.o
4+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -DSOURCE2 -c %s -o %t2.o
5+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %t1.o %t2.o -o %t.exe
66
// RUN: %CPU_RUN_PLACEHOLDER %t.exe
77
// RUN: %GPU_RUN_PLACEHOLDER %t.exe
88
// RUN: %ACC_RUN_PLACEHOLDER %t.exe
@@ -11,11 +11,10 @@
1111
// static library.
1212
// RUN: rm -f %t.a
1313
// RUN: llvm-ar crv %t.a %t1.o
14-
// RUN: %clangxx -fsycl %t2.o -foffload-static-lib=%t.a -o %t.exe
14+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %t2.o -foffload-static-lib=%t.a -o %t.exe
1515
// RUN: %CPU_RUN_PLACEHOLDER %t.exe
1616
// RUN: %GPU_RUN_PLACEHOLDER %t.exe
1717
// RUN: %ACC_RUN_PLACEHOLDER %t.exe
18-
// XFAIL: cuda
1918

2019
#include <CL/sycl.hpp>
2120
#include <iostream>

0 commit comments

Comments
 (0)