Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SYCL][E2E] Refactor is_compatible tests #16852

Open
wants to merge 3 commits into
base: sycl
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// REQUIRES: hip, opencl, gpu, cpu
// REQUIRES: hip, any-device-is-cpu

// 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

// RUN: env ONEAPI_DEVICE_SELECTOR=hip:gpu %{run} %t.out
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:gpu %{run} not %t.out
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:cpu %{run} not %t.out
// RUN: env ONEAPI_DEVICE_SELECTOR=hip:gpu %{run-unfiltered-devices} %t.out
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:cpu %{run-unfiltered-devices} not %t.out
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// REQUIRES: cuda, opencl, gpu, cpu
// REQUIRES: opencl, any-device-is-gpu, any-device-is-cpu

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

// RUN: env ONEAPI_DEVICE_SELECTOR=cuda:gpu %{run} %t.out
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:gpu %{run} not %t.out
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:cpu %{run} not %t.out
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:gpu %{run-unfiltered-devices} not %t.out
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:cpu %{run-unfiltered-devices} not %t.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// REQUIRES: cuda

// RUN: %clangxx -fsycl -fsycl-targets=spir64 %S/Inputs/is_compatible_with_env.cpp -o %t.out
// RUN: %{run} not %t.out

// RUN: %clangxx -fsycl -fsycl-targets=nvptx64-nvidia-cuda %S/Inputs/is_compatible_with_env.cpp -o %t.out
// RUN: %{run} %t.out
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// REQUIRES: cuda, opencl, gpu, cpu
// REQUIRES: opencl, any-device-is-gpu, any-device-is-cpu

// RUN: %clangxx -fsycl -fsycl-targets=spir64 %S/Inputs/is_compatible_with_env.cpp -o %t.out

// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:cpu %{run} %t.out
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:gpu %{run} %t.out
// RUN: env ONEAPI_DEVICE_SELECTOR=cuda:gpu %{run} not %t.out
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// REQUIRES: opencl-aot, accelerator, gpu, cpu
// REQUIRES: opencl-aot, any-device-is-gpu, any-device-is-cpu

// RUN: %clangxx -fsycl -fsycl-targets=spir64_fpga %S/Inputs/is_compatible_with_env.cpp -o %t.out

// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:fpga %{run} %t.out
// RUN: env ONEAPI_DEVICE_SELECTOR=*:gpu %{run} not %t.out
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:cpu %{run} not %t.out
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:fpga %{run-unfiltered-devices} %t.out
// RUN: env ONEAPI_DEVICE_SELECTOR=*:gpu %{run-unfiltered-devices} not %t.out
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:cpu %{run-unfiltered-devices} not %t.out
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// REQUIRES: ocloc, gpu, level_zero, cpu
// REQUIRES: ocloc, any-device-is-cpu, level_zero

// RUN: %clangxx -fsycl -fsycl-targets=spir64_gen -Xsycl-target-backend "-device *" %S/Inputs/is_compatible_with_env.cpp -o %t.out
// RUN: %clangxx -fsycl -fsycl-targets=spir64_gen -Xsycl-target-backend=spir64_gen %gpu_aot_target_opts %S/Inputs/is_compatible_with_env.cpp -o %t.out

// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:gpu %{run} %t.out
// RUN: env ONEAPI_DEVICE_SELECTOR=level_zero:gpu %{run} %t.out
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:cpu %{run} not %t.out
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:gpu %{run-unfiltered-devices} %t.out
// RUN: env ONEAPI_DEVICE_SELECTOR=level_zero:gpu %{run-unfiltered-devices} %t.out
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:cpu %{run-unfiltered-devices} not %t.out
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// REQUIRES: opencl-aot, cpu, gpu, level_zero
// REQUIRES: opencl-aot, any-device-is-cpu, level_zero

// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 %S/Inputs/is_compatible_with_env.cpp -o %t.out

// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:cpu %{run} %t.out
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:gpu %{run} not %t.out
// RUN: env ONEAPI_DEVICE_SELECTOR=level_zero:gpu %{run} not %t.out
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:cpu %{run-unfiltered-devices} %t.out
// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:gpu %{run-unfiltered-devices} not %t.out
// RUN: env ONEAPI_DEVICE_SELECTOR=level_zero:gpu %{run-unfiltered-devices} not %t.out
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// requires: cpu, gpu, accelerator
// UNSUPPORTED: hip
// FIXME: enable the test back, see intel/llvm#8146
// UNSUPPORTED-TRACKER: https://github.com/intel/llvm/issues/8146
// RUN: %{build} -Wno-error=incorrect-sub-group-size %O0 -o %t.out
// RUN: %{run} %t.out

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
// tests to match the required format and in that case you should just update
// (i.e. reduce) the number and the list below.
//
// NUMBER-OF-UNSUPPORTED-WITHOUT-INFO: 375
// NUMBER-OF-UNSUPPORTED-WITHOUT-INFO: 374
//
// List of improperly UNSUPPORTED tests.
// Remove the CHECK once the test has been properly UNSUPPORTED.
Expand Down Expand Up @@ -296,7 +296,6 @@
// CHECK-NEXT: NonUniformGroups/opportunistic_group.cpp
// CHECK-NEXT: NonUniformGroups/tangle_group.cpp
// CHECK-NEXT: NonUniformGroups/tangle_group_algorithms.cpp
// CHECK-NEXT: OptionalKernelFeatures/is_compatible/is_compatible_with_aspects.cpp
// CHECK-NEXT: OptionalKernelFeatures/large-reqd-work-group-size.cpp
// CHECK-NEXT: OptionalKernelFeatures/no-fp64-optimization-declared-aspects.cpp
// CHECK-NEXT: Printf/char.cpp
Expand Down
Loading