Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/HIPUtility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ void HIP::constructHIPFatbinCommand(Compilation &C, const JobAction &JA,
Args.MakeArgString(std::string("-output=").append(Output));
BundlerArgs.push_back(BundlerOutputArg);

// For SYCL, the compression is occuring during the wrapping step, so we do
// For SYCL, the compression is occurring during the wrapping step, so we do
// not want to do additional compression here.
if (!JA.isDeviceOffloading(Action::OFK_SYCL))
addOffloadCompressArgs(Args, BundlerArgs);
Expand Down
5 changes: 3 additions & 2 deletions clang/test/Driver/sycl-offload-wrapper-compression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
// RUN: %clangxx -### -fsycl --offload-compression-level=3 %s 2>&1 | FileCheck %s --check-prefix=CHECK-NO-COMPRESS

// For SYCL offloading to HIP, make sure we don't pass '--compress' to offload-bundler.
// Clang thows an error in the following command "cannot find 'remangled-l64-signed_char.libspirv-amdgcn-amd-amdhsa.bc'", that's why adding 'not'.
// Clang throws an error in the following command "cannot find 'remangled-l64-signed_char.libspirv-amdgcn-amd-amdhsa.bc'" on some machine,
// that's why appending '|| true'. This error should not affect the driver invocation, which this test intends to verify.

// RUN: not %clangxx -### -fsycl --offload-compress -Xsycl-target-backend=amdgcn-amd-amdhsa --offload-arch=gfx1031 -fsycl-targets=amdgcn-amd-amdhsa %s > %t.driver 2>&1
// RUN: (%clangxx -### -fsycl --offload-compress -Xsycl-target-backend=amdgcn-amd-amdhsa --offload-arch=gfx1031 -fsycl-targets=amdgcn-amd-amdhsa %s > %t.driver 2>&1) || true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of using || true here, add the -fno-sycl-libspirv -nogpulib options to the command line to limit library requirements.

// RUN: FileCheck %s --check-prefix=CHECK-NO-COMPRESS-BUNDLER --input-file=%t.driver

// CHECK-NO-COMPRESS-NOT: {{.*}}clang-offload-wrapper{{.*}}"-offload-compress"{{.*}}
Expand Down
Loading