Skip to content

Commit 625c4a7

Browse files
committed
Change restrictions on bfloat16_example
Signed-off-by: Larsen, Steffen <[email protected]>
1 parent 1326e5d commit 625c4a7

File tree

4 files changed

+30
-21
lines changed

4 files changed

+30
-21
lines changed

sycl/test-e2e/BFloat16/bfloat16_example.cpp

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,10 @@
11
///
2-
/// Check if bfloat16 example works using fallback libraries AOT compiled for
3-
/// both GPU and CPU.
2+
/// Checks a simple case of bfloat16, also employed for AOT library fallback.
43
///
54

6-
// REQUIRES: opencl-aot, ocloc, gpu-intel-gen12
7-
85
// RUN: %clangxx -fsycl %s -o %t.out
96
// RUN: %{run} %t.out
107

11-
// RUN: %clangxx -fsycl -fsycl-targets=spir64 %s -o %t.out
12-
// RUN: %{run} %t.out
13-
14-
// RUN: %clangxx -fsycl -fsycl-targets=spir64,spir64_gen -Xsycl-target-backend=spir64_gen "-device gen12lp" %s -o %t.out
15-
// RUN: %{run} %t.out
16-
17-
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64,spir64_gen -Xsycl-target-backend=spir64_gen "-device gen12lp" %s -o %t.out
18-
// RUN: %{run} %t.out
19-
208
#include "bfloat16_example.hpp"
219

2210
int main() {
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
///
2+
/// Check if bfloat16 example works using fallback libraries AOT compiled for
3+
/// both GPU and CPU.
4+
///
5+
6+
// REQUIRES: opencl-aot, ocloc, gpu-intel-gen12, any-device-is-cpu
7+
8+
// RUN: %clangxx -fsycl -fsycl-targets=spir64 %s -o %t.out
9+
// RUN: %{run} %t.out
10+
11+
// RUN: %clangxx -fsycl -fsycl-targets=spir64,spir64_gen -Xsycl-target-backend=spir64_gen "-device gen12lp" %s -o %t.out
12+
// RUN: %{run} %t.out
13+
14+
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64,spir64_gen -Xsycl-target-backend=spir64_gen "-device gen12lp" %s -o %t.out
15+
// RUN: %{run} %t.out
16+
17+
#include "bfloat16_example.hpp"
18+
19+
int main() {
20+
return runTest();
21+
}

sycl/test-e2e/BFloat16/bfloat16_example_cpu.cpp renamed to sycl/test-e2e/BFloat16/bfloat16_example_aot_cpu.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
/// CPU.
44
///
55

6-
// REQUIRES: opencl-aot, ocloc, gpu-intel-gen12, cpu
6+
// REQUIRES: opencl-aot, ocloc, gpu-intel-gen12, any-device-is-cpu
77

8-
// RUN: %clangxx -fsycl -fsycl-targets=spir64,spir64_gen -Xsycl-target-backend=spir64_gen "-device pvc" %s -o %t.out
9-
// RUN: %{run} %t.out
8+
// RUN: %clangxx -fsycl -fsycl-targets=spir64,spir64_gen -Xsycl-target-backend=spir64_gen "-device dg1" %s -o %t.out
9+
// RUN: if cpu %{ %{run} %t.out %}
1010

11-
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64,spir64_gen -Xsycl-target-backend=spir64_gen "-device pvc" %s -o %t.out
12-
// RUN: %{run} %t.out
11+
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64,spir64_gen -Xsycl-target-backend=spir64_gen "-device dg1" %s -o %t.out
12+
// RUN: if cpu %{ %{run} %t.out %}
1313

1414
#include "bfloat16_example.hpp"
1515

sycl/test-e2e/BFloat16/bfloat16_example_gpu.cpp renamed to sycl/test-e2e/BFloat16/bfloat16_example_aot_gpu.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
/// GPU.
44
///
55

6-
// REQUIRES: opencl-aot, ocloc, gpu-intel-gen12, gpu
6+
// REQUIRES: opencl-aot, ocloc, gpu-intel-gen12, any-device-is-gpu
77

88
// RUN: %clangxx -fsycl -fsycl-targets=spir64_gen -Xsycl-target-backend "-device gen12lp" %s -o %t.out
9-
// RUN: %{run} %t.out
9+
// RUN: %if gpu %{%{run} %t.out %}
1010

1111
// RUN: %clangxx -fsycl -fsycl-targets=spir64_gen -Xsycl-target-backend "-device *" %s -o %t.out
12-
// RUN: %{run} %t.out
12+
// RUN: %if gpu %{%{run} %t.out %}
1313

1414
#include "bfloat16_example.hpp"
1515

0 commit comments

Comments
 (0)