Skip to content

Commit cd125a4

Browse files
authored
[SYCL][E2E] Use target feature in 3 tests that explicitly set the triple (#16828)
These tests should only build on `build-only` if we have either `target-nvidia` or `target-amd` enabled. Currently they build regardless of what triples are available, and this was not detected because these tests set the triple explicitly rather than through the `%{sycl_target_opts}` expansion.
1 parent 17f2936 commit cd125a4

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_amdgcn.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: hip, opencl, gpu, cpu
1+
// REQUIRES: target-amd, opencl, gpu, cpu
22

33
// RUN: %clangxx -fsycl -Xsycl-target-backend=amdgcn-amd-amdhsa --offload-arch=gfx906 -fsycl-targets=amdgcn-amd-amdhsa %S/Inputs/is_compatible_with_env.cpp -o %t.out
44

sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_nvptx64.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: cuda, opencl, gpu, cpu
1+
// REQUIRES: target-nvidia, opencl, gpu, cpu
22

33
// RUN: %clangxx -fsycl -fsycl-targets=nvptx64-nvidia-cuda %S/Inputs/is_compatible_with_env.cpp -o %t.out
44

sycl/test-e2e/SpecConstants/2020/non_native/cuda.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// REQUIRES: cuda
1+
// REQUIRES: target-nvidia
22

3-
// RUN: %clangxx -fsycl -fsycl-targets=nvptx64-nvidia-cuda %S/Inputs/common.cpp -o %t.out
3+
// RUN: %clangxx -fsycl %{sycl_target_opts} %S/Inputs/common.cpp -o %t.out
44
// RUN: %{run-unfiltered-devices} env ONEAPI_DEVICE_SELECTOR="cuda:*" %t.out
55

66
// This test checks correctness of SYCL2020 non-native specialization constants

0 commit comments

Comments
 (0)