Skip to content

Commit ea89d42

Browse files
vladimirlazsys_bbsycl
authored and
sys_bbsycl
committed
[SYCL] Enable LIT testing with CUDA BE
Signed-off-by: Vladimir Lazarev <[email protected]>
1 parent 52676dd commit ea89d42

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+212
-156
lines changed

sycl/test/backend/cuda/primary_context.cpp

-116
This file was deleted.

sycl/test/basic_tests/boolean.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
// RUN: %CPU_RUN_PLACEHOLDER %t.out
44
// RUN: %GPU_RUN_PLACEHOLDER %t.out
55
// RUN: %ACC_RUN_PLACEHOLDER %t.out
6-
// XFAIL: cuda
7-
// TODO: investigate incorrect results on cuda backend
86
#include <CL/sycl.hpp>
97

108
#include <cassert>

sycl/test/basic_tests/buffer/buffer_full_copy.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
// RUN: %GPU_RUN_PLACEHOLDER %t2.out
77
// RUN: %ACC_RUN_PLACEHOLDER %t2.out
88

9-
// TODO: cuda_piEnqueueMemBufferCopy not implemented
10-
// XFAIL: cuda
11-
129
//==------------- buffer_full_copy.cpp - SYCL buffer basic test ------------==//
1310
//
1411
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.

sycl/test/group-algorithm/all_of.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
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
55
// RUN: %ACC_RUN_PLACEHOLDER %t.out
6+
// UNSUPPORTED: cuda
67

78
#include <CL/sycl.hpp>
89
#include <algorithm>

sycl/test/group-algorithm/any_of.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
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
55
// RUN: %ACC_RUN_PLACEHOLDER %t.out
6+
// UNSUPPORTED: cuda
67

78
#include <CL/sycl.hpp>
89
#include <algorithm>

sycl/test/group-algorithm/broadcast.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
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
55
// RUN: %ACC_RUN_PLACEHOLDER %t.out
6+
// UNSUPPORTED: cuda
67

78
#include <CL/sycl.hpp>
89
#include <algorithm>

sycl/test/group-algorithm/exclusive_scan.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
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
55
// RUN: %ACC_RUN_PLACEHOLDER %t.out
6+
// UNSUPPORTED: cuda
67

78
#include <CL/sycl.hpp>
89
#include <algorithm>

sycl/test/group-algorithm/inclusive_scan.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
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
55
// RUN: %ACC_RUN_PLACEHOLDER %t.out
6+
// UNSUPPORTED: cuda
67

78
#include <CL/sycl.hpp>
89
#include <algorithm>

sycl/test/group-algorithm/leader.cpp

+1-1
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/group-algorithm/none_of.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
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
55
// RUN: %ACC_RUN_PLACEHOLDER %t.out
6+
// UNSUPPORTED: cuda
67

78
#include <CL/sycl.hpp>
89
#include <algorithm>

sycl/test/group-algorithm/reduce.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
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
55
// RUN: %ACC_RUN_PLACEHOLDER %t.out
6+
// UNSUPPORTED: cuda
67

78
#include <CL/sycl.hpp>
89
#include <algorithm>

sycl/test/hier_par/hier_par_basic.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
// RUN: %GPU_RUN_PLACEHOLDER %t.out
1313
// RUN: %ACC_RUN_PLACEHOLDER %t.out
1414

15-
// TODO: ptxas fatal : Unresolved extern function '__spirv_ControlBarrier'
16-
// XFAIL: cuda
17-
1815
// This test checks hierarchical parallelism invocation APIs, but without any
1916
// data or code with side-effects between the work group and work item scopes.
2017

sycl/test/kernel_from_file/hw.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66

77
// TODO: InvalidTargetTriple: Expects spir-unknown-unknown or spir64-unknown-unknown. Actual target triple is x86_64-unknown-linux-gnu
88

9-
// XFAIL: cuda
10-
// Currently unsupported on cuda as this test specifically tests a SPV path.
11-
129
#include <CL/sycl.hpp>
1310
#include <iostream>
1411

sycl/test/lit.cfg.py

+1
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ def getDeviceCount(device_type):
155155
config.available_features.add('gpu')
156156
if cuda:
157157
config.available_features.add('cuda')
158+
gpu_run_substitute += " SYCL_BE=PI_CUDA "
158159

159160
if platform.system() == "Linux":
160161
gpu_run_on_linux_substitute = "env SYCL_DEVICE_TYPE=GPU "

sycl/test/multi_ptr/multi_ptr.cpp

+1-1
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-
// RUN: %clangxx -DRESTRICT_WRITE_ACCESS_TO_CONSTANT_PTR -fsycl %s -o %t1.out
6+
// RUN: %clangxx -DRESTRICT_WRITE_ACCESS_TO_CONSTANT_PTR -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out
77
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
88
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
99
// RUN: %GPU_RUN_PLACEHOLDER %t1.out

sycl/test/program_manager/env_vars.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -O0 -fsycl %s -o %t.out -lsycl
1+
// RUN: %clangxx -O0 -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -lsycl
22
//
33
// Deprecated SYCL_PROGRAM_BUILD_OPTIONS should work as an alias to
44
// SYCL_PROGRAM_COMPILE_OPTIONS:
@@ -16,7 +16,6 @@
1616
// RUN: %CPU_RUN_PLACEHOLDER SYCL_PROGRAM_COMPILE_OPTIONS="-enable-link-options -cl-denorms-are-zero" SHOULD_CRASH=1 %t.out
1717
// RUN: %CPU_RUN_PLACEHOLDER SYCL_PROGRAM_LINK_OPTIONS="-g" SHOULD_CRASH=1 %t.out
1818

19-
2019
#include <CL/sycl.hpp>
2120
#include <cassert>
2221
#include <memory>

sycl/test/regression/private_array_init_test.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsycl %s -o %t.out -lOpenCL
1+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -lOpenCL
22

33
// RUN: %CPU_RUN_PLACEHOLDER %t.out
44
// RUN: %GPU_RUN_PLACEHOLDER %t.out

sycl/test/regression/static-buffer-dtor.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
// TODO: terminate called after throwing an instance of 'cl::sycl::runtime_error'
1818
// TODO: what(): OpenCL API failed. OpenCL API returns: -999 (Unknown OpenCL error code) -999 (Unknown OpenCL error code)
19-
// XFAIL: cuda
2019

2120
#include <CL/sycl.hpp>
2221

sycl/test/scheduler/DataMovement.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -I %sycl_source_dir %s -o %t.out
2-
// RUN: %t.out
2+
// RUN: %CPU_RUN_PLACEHOLDER %t.out
3+
// RUN: %GPU_RUN_PLACEHOLDER %t.out
4+
// RUN: %ACC_RUN_PLACEHOLDER %t.out
5+
// Incorrect event callback processing for host device.
6+
// XFAIL: cuda
37
//
48
//==-------------------------- DataMovement.cpp ----------------------------==//
59
//

sycl/test/usm/allocator_vector.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
33
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
44
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
5+
// UNSUPPORTED: cuda
56

67
//==---- allocator_vector.cpp - Allocator Container test -------------------==//
78
//

sycl/test/usm/allocator_vector_fail.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
33
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
44
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
5+
// UNSUPPORTED: cuda
56

67
//==-- allocator_vector_fail.cpp - Device Memory Allocator fail test -------==//
78
//

sycl/test/usm/allocatorll.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
33
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
44
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
5+
// UNSUPPORTED: cuda
56

67
//==---- allocatorll.cpp - Device Memory Linked List Allocator test --------==//
78
//

sycl/test/usm/badmalloc.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
// RUN: %clangxx -fsycl %s -o %t1.out
1+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out
22
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
33
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
44
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
55

6-
// UNSUPPORTED: windows
6+
// UNSUPPORTED: windows,cuda
77

88
//==----------------- badmalloc.cpp - Bad Mallocs test ---------------------==//
99
//

sycl/test/usm/depends_on.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
33
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
44
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
5+
// UNSUPPORTED: cuda
56

67
//==----------------- depends_on.cpp - depends_on test ---------------------==//
78
//

sycl/test/usm/dmemll.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
33
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
44
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
5+
// UNSUPPORTED: cuda
56

67
//==------------------- dmemll.cpp - Device Memory Linked List test --------==//
78
//

sycl/test/usm/hmemll.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
33
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
44
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
5+
// UNSUPPORTED: cuda
56

67
//==------------------- hmemll.cpp - Host Memory Linked List test ----------==//
78
//

sycl/test/usm/math.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
// RUN: %CPU_RUN_PLACEHOLDER %t.out
44

55
// REQUIRES: cpu
6-
// TODO: ptxas fatal : Unresolved extern function '_Z20__spirv_ocl_lgamma_rfPi'
7-
// XFAIL: cuda
86

97
#include <CL/sycl.hpp>
108

sycl/test/usm/memadvise.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
33
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
44
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
5+
// UNSUPPORTED: cuda
56

67
//==---------------- memadvise.cpp - Shared Memory Linked List test --------==//
78
//

sycl/test/usm/memcpy.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
8-
// RUN: %clangxx -fsycl %s -o %t1.out
8+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out
99
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
1010
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
11+
// UNSUPPORTED: cuda
1112

1213
#include <CL/sycl.hpp>
1314

sycl/test/usm/memset.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
// RUN: %clangxx -fsycl %s -o %t1.out
1+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out
22
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
33
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
4+
// UNSUPPORTED: cuda
45

56
//==---- memset.cpp - USM memset test --------------------------------------==//
67
//

0 commit comments

Comments
 (0)