Skip to content

Commit 9b6c8e2

Browse files
committed
[SYCL] address review comments #2
Signed-off-by: Sergey V Maslov <[email protected]>
1 parent 2452093 commit 9b6c8e2

File tree

7 files changed

+37
-15
lines changed

7 files changed

+37
-15
lines changed

sycl/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ set( SYCL_TOOLCHAIN_DEPLOY_COMPONENTS
282282
llvm-link
283283
llvm-objcopy
284284
sycl-post-link
285+
sycl-ls
285286
clang-resource-headers
286287
opencl-headers
287288
sycl-headers
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
//===----------------------------------------------------------------------===//

sycl/test/plugins/lspi_gpu_opencl.cpp renamed to sycl/test/plugins/sycl-ls-gpu-opencl.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
// REQUIRES: gpu
1+
// REQUIRES: gpu, opencl
22

3-
// RUN: lspi --verbose >%t.default.out
3+
// RUN: sycl-ls --verbose >%t.default.out
44
// RUN: FileCheck %s --check-prefixes=CHECK-GPU-BUILTIN,CHECK-GPU-CUSTOM --input-file %t.default.out
55

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
77
// RUN: FileCheck %s --check-prefixes=CHECK-GPU-BUILTIN,CHECK-GPU-CUSTOM --input-file %t.opencl.out
88

99
// CHECK-GPU-BUILTIN: gpu_selector(){{.*}}GPU : OpenCL
1010
// CHECK-GPU-CUSTOM: custom_selector(gpu){{.*}}GPU : OpenCL
1111

12-
//==------- lspi_gpu_opencl.cpp - SYCL test for discovered/selected devices===//
12+
//==-- sycl-ls-gpu-opencl.cpp - SYCL test for discovered/selected devices -===//
1313
//
1414
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
1515
// See https://llvm.org/LICENSE.txt for license information.

sycl/test/plugins/lspi_gpu_cuda.cpp renamed to sycl/test/plugins/sycl-ls-gpu-sycl-be.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
// REQUIRES: gpu, cuda
1+
// REQUIRES: gpu, cuda, opencl
22

3-
// RUN: lspi --verbose >%t.default.out
3+
// RUN: sycl-ls --verbose >%t.default.out
44
// RUN: FileCheck %s --check-prefixes=CHECK-BUILTIN-GPU-OPENCL,CHECK-CUSTOM-GPU-OPENCL --input-file %t.default.out
55

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
77
// RUN: FileCheck %s --check-prefixes=CHECK-BUILTIN-GPU-OPENCL,CHECK-CUSTOM-GPU-OPENCL --input-file %t.opencl.out
88

99
// CHECK-BUILTIN-GPU-OPENCL: gpu_selector(){{.*}}GPU : OpenCL
1010
// CHECK-CUSTOM-GPU-OPENCL: custom_selector(gpu){{.*}}GPU : OpenCL
1111

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
1313
// RUN: FileCheck %s --check-prefixes=CHECK-BUILTIN-GPU-CUDA,CHECK-CUSTOM-GPU-CUDA --input-file %t.cuda.out
1414

1515
// CHECK-BUILTIN-GPU-CUDA: gpu_selector(){{.*}}GPU : CUDA
1616
// CHECK-CUSTOM-GPU-CUDA: custom_selector(gpu){{.*}}GPU : CUDA
1717

18-
//==------- lspi_gpu_cuda.cpp - SYCL test for discovered/selected devices --==//
18+
//==---- sycl-ls-gpu-sycl-be.cpp - SYCL test for discovered/selected devices --==//
1919
//
2020
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
2121
// See https://llvm.org/LICENSE.txt for license information.

sycl/test/plugins/sycl-ls.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
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+
//===----------------------------------------------------------------------===//

sycl/tools/sycl-ls/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
1-
set(CMAKE_CXX_STANDARD 11)
2-
set(CMAKE_CXX_STANDARD_REQUIRED ON)
3-
set(CMAKE_CXX_EXTENSIONS OFF)
4-
51
add_executable(sycl-ls sycl-ls.cpp)
62
add_dependencies(sycl-ls sycl)
73
target_include_directories(sycl-ls PRIVATE "${sycl_inc_dir}")
84
target_link_libraries(sycl-ls
95
PRIVATE
106
sycl
117
OpenCL::Headers
12-
${OpenCL_LIBRARIES}
138
)

sycl/tools/sycl-ls/sycl-ls.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//===----------------------------------------------------------------------===//
88
//
99
// 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.
1111
//
1212
// There are two types of output:
1313
// concise (default) and

0 commit comments

Comments
 (0)