File tree Expand file tree Collapse file tree 7 files changed +37
-15
lines changed Expand file tree Collapse file tree 7 files changed +37
-15
lines changed Original file line number Diff line number Diff line change @@ -282,6 +282,7 @@ set( SYCL_TOOLCHAIN_DEPLOY_COMPONENTS
282
282
llvm-link
283
283
llvm-objcopy
284
284
sycl-post-link
285
+ sycl-ls
285
286
clang-resource-headers
286
287
opencl-headers
287
288
sycl-headers
Original file line number Diff line number Diff line change
1
+ // REQUIRES: gpu, cuda
2
+
3
+ // RUN: env SYCL_BE=PI_CUDA sycl-ls --verbose >%t.cuda.out
4
+ // RUN: FileCheck %s --check-prefixes=CHECK-BUILTIN-GPU-CUDA,CHECK-CUSTOM-GPU-CUDA --input-file %t.cuda.out
5
+
6
+ // CHECK-BUILTIN-GPU-CUDA: gpu_selector(){{.*}}GPU :{{.*}}CUDA
7
+ // CHECK-CUSTOM-GPU-CUDA: custom_selector(gpu){{.*}}GPU :{{.*}}CUDA
8
+
9
+ // ==---- sycl-ls-gpu-cuda.cpp - SYCL test for discovered/selected devices --==//
10
+ //
11
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
12
+ // See https://llvm.org/LICENSE.txt for license information.
13
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
14
+ //
15
+ // ===----------------------------------------------------------------------===//
Original file line number Diff line number Diff line change 1
- // REQUIRES: gpu
1
+ // REQUIRES: gpu, opencl
2
2
3
- // RUN: lspi --verbose >%t.default.out
3
+ // RUN: sycl-ls --verbose >%t.default.out
4
4
// RUN: FileCheck %s --check-prefixes=CHECK-GPU-BUILTIN,CHECK-GPU-CUSTOM --input-file %t.default.out
5
5
6
- // RUN: env SYCL_BE=PI_OPENCL lspi --verbose >%t.opencl.out
6
+ // RUN: env SYCL_BE=PI_OPENCL sycl-ls --verbose >%t.opencl.out
7
7
// RUN: FileCheck %s --check-prefixes=CHECK-GPU-BUILTIN,CHECK-GPU-CUSTOM --input-file %t.opencl.out
8
8
9
9
// CHECK-GPU-BUILTIN: gpu_selector(){{.*}}GPU : OpenCL
10
10
// CHECK-GPU-CUSTOM: custom_selector(gpu){{.*}}GPU : OpenCL
11
11
12
- // ==------- lspi_gpu_opencl .cpp - SYCL test for discovered/selected devices===//
12
+ // ==-- sycl-ls-gpu-opencl .cpp - SYCL test for discovered/selected devices - ===//
13
13
//
14
14
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
15
15
// See https://llvm.org/LICENSE.txt for license information.
Original file line number Diff line number Diff line change 1
- // REQUIRES: gpu, cuda
1
+ // REQUIRES: gpu, cuda, opencl
2
2
3
- // RUN: lspi --verbose >%t.default.out
3
+ // RUN: sycl-ls --verbose >%t.default.out
4
4
// RUN: FileCheck %s --check-prefixes=CHECK-BUILTIN-GPU-OPENCL,CHECK-CUSTOM-GPU-OPENCL --input-file %t.default.out
5
5
6
- // RUN: env SYCL_BE=PI_OPENCL lspi --verbose >%t.opencl.out
6
+ // RUN: env SYCL_BE=PI_OPENCL sycl-ls --verbose >%t.opencl.out
7
7
// RUN: FileCheck %s --check-prefixes=CHECK-BUILTIN-GPU-OPENCL,CHECK-CUSTOM-GPU-OPENCL --input-file %t.opencl.out
8
8
9
9
// CHECK-BUILTIN-GPU-OPENCL: gpu_selector(){{.*}}GPU : OpenCL
10
10
// CHECK-CUSTOM-GPU-OPENCL: custom_selector(gpu){{.*}}GPU : OpenCL
11
11
12
- // RUN: env SYCL_BE=PI_CUDA lspi --verbose >%t.cuda.out
12
+ // RUN: env SYCL_BE=PI_CUDA sycl-ls --verbose >%t.cuda.out
13
13
// RUN: FileCheck %s --check-prefixes=CHECK-BUILTIN-GPU-CUDA,CHECK-CUSTOM-GPU-CUDA --input-file %t.cuda.out
14
14
15
15
// CHECK-BUILTIN-GPU-CUDA: gpu_selector(){{.*}}GPU : CUDA
16
16
// CHECK-CUSTOM-GPU-CUDA: custom_selector(gpu){{.*}}GPU : CUDA
17
17
18
- // ==------- lspi_gpu_cuda .cpp - SYCL test for discovered/selected devices --==//
18
+ // ==---- sycl-ls-gpu-sycl-be .cpp - SYCL test for discovered/selected devices --==//
19
19
//
20
20
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
21
21
// See https://llvm.org/LICENSE.txt for license information.
Original file line number Diff line number Diff line change
1
+ // RUN: sycl-ls --verbose | grep "Device \[" | wc -l >%t.verbose.out
2
+ // RUN: sycl-ls | wc -l >%t.concise.out
3
+ // RUN: diff %t.verbose.out %t.concise.out
4
+
5
+ // ==---- sycl-ls.cpp - SYCL test for consistency of sycl-ls output ---------==//
6
+ //
7
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
8
+ // See https://llvm.org/LICENSE.txt for license information.
9
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
10
+ //
11
+ // ===----------------------------------------------------------------------===//
Original file line number Diff line number Diff line change 1
- set (CMAKE_CXX_STANDARD 11 )
2
- set (CMAKE_CXX_STANDARD_REQUIRED ON )
3
- set (CMAKE_CXX_EXTENSIONS OFF )
4
-
5
1
add_executable (sycl-ls sycl-ls.cpp )
6
2
add_dependencies (sycl-ls sycl )
7
3
target_include_directories (sycl-ls PRIVATE "${sycl_inc_dir} " )
8
4
target_link_libraries (sycl-ls
9
5
PRIVATE
10
6
sycl
11
7
OpenCL::Headers
12
- ${OpenCL_LIBRARIES}
13
8
)
Original file line number Diff line number Diff line change 7
7
// ===----------------------------------------------------------------------===//
8
8
//
9
9
// The "sycl-ls" utility lists all platforms/devices discovered by PI similar to
10
- // how lscl prints this for OpenCL devices.
10
+ // how clinfo prints this for OpenCL devices.
11
11
//
12
12
// There are two types of output:
13
13
// concise (default) and
You can’t perform that action at this time.
0 commit comments