Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 4e86afd

Browse files
[SYCL] Allow default selected GPU to be from any available platform (#224)
Signed-off-by: Steffen Larsen <[email protected]>
1 parent cbf1934 commit 4e86afd

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// REQUIRES: gpu
2+
3+
// RUN: env --unset=SYCL_DEVICE_FILTER sycl-ls --verbose >%t.default.out
4+
// RUN: FileCheck %s --check-prefixes=CHECK-GPU-BUILTIN,CHECK-GPU-CUSTOM --input-file %t.default.out
5+
6+
// CHECK-GPU-BUILTIN: gpu_selector(){{.*}}GPU : {{.*}}{{Level-Zero|CUDA|OpenCL}}
7+
// clang-format off
8+
// CHECK-GPU-CUSTOM: custom_selector(gpu){{.*}}GPU : {{.*}}{{Level-Zero|CUDA|OpenCL}}
9+
// clang-format on
10+
11+
//==--------------------- sycl-ls-gpu-default-any.cpp ----------------------==//
12+
//
13+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
14+
// See https://llvm.org/LICENSE.txt for license information.
15+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
16+
//
17+
//===----------------------------------------------------------------------===//
18+
19+
// This test checks that a valid GPU is returned by sycl-ls by default if one
20+
// is present.
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
1-
// REQUIRES: gpu
1+
// REQUIRES: gpu, level-zero
22

33
// RUN: env --unset=SYCL_DEVICE_FILTER sycl-ls --verbose >%t.default.out
44
// RUN: FileCheck %s --check-prefixes=CHECK-GPU-BUILTIN,CHECK-GPU-CUSTOM --input-file %t.default.out
55

66
// CHECK-GPU-BUILTIN: gpu_selector(){{.*}}GPU : {{.*}}Level-Zero
77
// CHECK-GPU-CUSTOM: custom_selector(gpu){{.*}}GPU : {{.*}}Level-Zero
88

9-
//==-- sycl-ls-gpu-default.cpp - SYCL test for default selected gpu device -==//
9+
//==------------------ sycl-ls-gpu-default-level-zero.cpp ------------------==//
1010
//
1111
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
1212
// See https://llvm.org/LICENSE.txt for license information.
1313
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
1414
//
1515
//===----------------------------------------------------------------------===//
16+
17+
// This test checks that, if available, a Level-Zero GPU will be selected by
18+
// the default GPU selector.

0 commit comments

Comments
 (0)