Skip to content

Commit

Permalink
[SYCL][Driver] Fix sycl-device-lib test failures for non NVPTX or AMD…
Browse files Browse the repository at this point in the history
…GPU builds of DPC++ (#15608)

These tests failed on non Cuda or Hip host machines due to missing
installations. Additionally, the `-only-needed` tests don't need
`libspirv` so passing `-fno-sycl-libspirv` to the invocation is also
required to succeed.
  • Loading branch information
GeorgeWeb authored Oct 7, 2024
1 parent 006dc42 commit 9995592
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion clang/test/Driver/sycl-device-lib-amdgcn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

// Check that llvm-link uses the "-only-needed" flag.
// Not using the flag breaks kernel bundles.
// RUN: %clangxx -### -nogpulib --sysroot=%S/Inputs/SYCL \
// RUN: %clangxx -### -nogpulib -fno-sycl-libspirv --sysroot=%S/Inputs/SYCL \
// RUN: -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx906 %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHK-ONLY-NEEDED %s

Expand Down
2 changes: 1 addition & 1 deletion clang/test/Driver/sycl-device-lib-nvptx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

// Check that llvm-link uses the "-only-needed" flag.
// Not using the flag breaks kernel bundles.
// RUN: %clangxx -### --sysroot=%S/Inputs/SYCL -fsycl -fsycl-targets=nvptx64-nvidia-cuda %s 2>&1 \
// RUN: %clangxx -### -nocudalib -fno-sycl-libspirv --sysroot=%S/Inputs/SYCL -fsycl -fsycl-targets=nvptx64-nvidia-cuda %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHK-ONLY-NEEDED %s

// CHK-ONLY-NEEDED: llvm-link"{{.*}}"-only-needed"{{.*}}"{{.*}}devicelib--cuda.bc"{{.*}}

0 comments on commit 9995592

Please sign in to comment.