File tree 4 files changed +10
-14
lines changed
4 files changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -66,3 +66,6 @@ def find_shlibpath_var():
66
66
else :
67
67
lit_config .warning ("unable to inject shared library path on '{}'"
68
68
.format (platform .system ()))
69
+
70
+ config .environment ['SYCL_BE' ] = lit_config .params .get ('SYCL_BE' , "PI_OPENCL" )
71
+ lit_config .note ("Backend (SYCL_BE): {}" .format (config .environment ['SYCL_BE' ]))
Original file line number Diff line number Diff line change 1
1
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
2
- // RUN: env SYCL_DEVICE_TYPE=HOST %t.out | FileCheck %s
3
- // RUN: %CPU_RUN_PLACEHOLDER %t.out %CPU_CHECK_PLACEHOLDER
4
- // RUN: %GPU_RUN_PLACEHOLDER %t.out %GPU_CHECK_PLACEHOLDER
5
- // RUN: %ACC_RUN_PLACEHOLDER %t.out %ACC_CHECK_PLACEHOLDER
2
+ // RUN: env SYCL_BE=%sycl_be %t.out | FileCheck %s
6
3
// ==------------------- handler.cpp ----------------------------------------==//
7
- //
8
4
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
9
5
// See https://llvm.org/LICENSE.txt for license information.
10
6
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
11
7
//
12
8
// ===----------------------------------------------------------------------===//
13
9
14
10
#include < CL/sycl.hpp>
11
+ #include < cassert>
15
12
16
13
using namespace cl ;
17
14
18
15
int main () {
19
16
20
- bool Failed = false ;
21
-
22
17
sycl::queue Queue ([](sycl::exception_list ExceptionList) {
23
18
if (ExceptionList.size () != 1 ) {
24
19
std::cerr << " Should be one exception in exception list" << std::endl;
@@ -33,8 +28,9 @@ int main() {
33
28
CGH.single_task <class Dummy2 >([]() {});
34
29
});
35
30
Queue.throw_asynchronous ();
36
- } catch (sycl::exception &E) {
31
+ assert (!" Expected exception not caught" );
32
+ } catch (sycl::exception &ExpectedException) {
37
33
// CHECK: Attempt to set multiple actions for the command group
38
- std::cout << E .what () << std::endl;
34
+ std::cout << ExpectedException .what () << std::endl;
39
35
}
40
36
}
Original file line number Diff line number Diff line change 1
1
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
2
- // RUN: env SYCL_DEVICE_TYPE=HOST %t.out
3
- // RUN: %CPU_RUN_PLACEHOLDER %t.out
4
- // RUN: %GPU_RUN_PLACEHOLDER %t.out
5
- // RUN: %ACC_RUN_PLACEHOLDER %t.out
2
+ // RUN: env SYCL_BE=%sycl_be %t.out
6
3
// ==--------------- queue.cpp - SYCL queue test ----------------------------==//
7
4
//
8
5
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
Original file line number Diff line number Diff line change 73
73
llvm_config .add_tool_substitutions (['llvm-spirv' ], [config .sycl_tools_dir ])
74
74
75
75
backend = lit_config .params .get ('SYCL_BE' , "PI_OPENCL" )
76
- lit_config .note ("Backend: {BACKEND }" .format (BACKEND = backend ))
76
+ lit_config .note ("Backend (SYCL_BE) : {}" .format (backend ))
77
77
config .substitutions .append ( ('%sycl_be' , backend ) )
78
78
79
79
get_device_count_by_type_path = os .path .join (config .llvm_tools_dir , "get_device_count_by_type" )
You can’t perform that action at this time.
0 commit comments