Skip to content

Commit

Permalink
[NFC][SYCL] Set some target restrictions for some tests (intel#12505)
Browse files Browse the repository at this point in the history
A few tests in the driver area require amdgpu or nvptx targets to be
built in order to properly run. Add these requirements to the tests.
  • Loading branch information
mdtoguchi authored Jan 29, 2024
1 parent 2f56926 commit a934d57
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions clang/test/Driver/sycl-offload-amdgcn.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/// Tests specific to `-fsycl-targets=amdgcn-amd-amdhsa`

// UNSUPPORTED: system-windows
// REQUIRES: amdgpu-registered-target

// Check that the offload arch is required
// RUN: not %clangxx -### -std=c++11 -target x86_64-unknown-linux-gnu -fsycl \
Expand Down
2 changes: 2 additions & 0 deletions clang/test/Driver/sycl-triple-dae-flags.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// REQUIRES: nvptx-registered-target, amdgpu-registered-target

// RUN: %clangxx -### -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx906 -fsycl-dead-args-optimization -nogpulib %s 2> %t.rocm.out
// RUN: FileCheck %s --input-file %t.rocm.out
// CHECK-NOT: -fenable-sycl-dae
Expand Down
2 changes: 2 additions & 0 deletions clang/test/Driver/sycl-unsupported-arch.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// REQUIRES: amdgpu-registered-target

/// Verify that compiler passes are correctly determined
// RUN: %clangxx -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend=amdgcn-amd-amdhsa --offload-arch=gfx600 -nogpulib -c -ccc-print-phases %s 2>&1 | FileCheck %s --check-prefix=CHECK-PHASES
// CHECK-PHASES: offload, "device-sycl (amdgcn-amd-amdhsa:gfx600)"
Expand Down

0 comments on commit a934d57

Please sign in to comment.