Skip to content

Commit 4a7d057

Browse files
Try to fix failing test
1 parent 3a2ea2a commit 4a7d057

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

sycl/test-e2e/Regression/multiple-targets.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
//
55
// REQUIRES: cuda || hip || native_cpu
66
// REQUIRES: build-and-run-mode
7-
// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple},spir64 -o %t1.out %s
7+
// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple},spir64 %if any-device-is-hip %{ %{hip_arch_opts} %} -o %t1.out %s
88
// RUN: %{run} %t1.out
99
//
10-
// RUN: %clangxx -fsycl -fsycl-targets=spir64,%{sycl_triple} -o %t2.out %s
10+
// RUN: %clangxx -fsycl -fsycl-targets=spir64,%{sycl_triple} %if any-device-is-hip %{ %{hip_arch_opts} %} -o %t2.out %s
1111
// RUN: %{run} %t2.out
1212
//
13-
// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple},spir64 -fsycl-device-code-split=per_kernel -o %t3.out %s
13+
// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple},spir64 %if any-device-is-hip %{ %{hip_arch_opts} %} -fsycl-device-code-split=per_kernel -o %t3.out %s
1414
// RUN: %{run} %t3.out
1515
//
16-
// RUN: %clangxx -fsycl -fsycl-targets=spir64,%{sycl_triple} -fsycl-device-code-split=per_kernel -o %t4.out %s
16+
// RUN: %clangxx -fsycl -fsycl-targets=spir64,%{sycl_triple} %if any-device-is-hip %{ %{hip_arch_opts} %} -fsycl-device-code-split=per_kernel -o %t4.out %s
1717
// RUN: %{run} %t4.out
1818

1919
#include <sycl/detail/core.hpp>

sycl/test-e2e/format.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,13 @@ def execute(self, test, litConfig):
176176

177177
sycl_target_opts = "-fsycl-targets=%{sycl_triple}"
178178
if get_triple("hip") in triples:
179-
sycl_target_opts += (
179+
hip_arch_opts = (
180180
" -Xsycl-target-backend=amdgcn-amd-amdhsa --offload-arch={}".format(
181181
test.config.amd_arch
182182
)
183183
)
184+
sycl_target_opts += hip_arch_opts
185+
substitutions.append(("%{hip_arch_opts}", hip_arch_opts))
184186
substitutions.append(("%{sycl_target_opts}", sycl_target_opts))
185187

186188
substitutions.append(

0 commit comments

Comments
 (0)