Skip to content

Commit b7044b5

Browse files
committed
add tests
Signed-off-by: Sidorov, Dmitry <[email protected]>
1 parent c66c1d4 commit b7044b5

File tree

4 files changed

+35
-47
lines changed

4 files changed

+35
-47
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Test SYCL -foffload-fp32-prec-div
2+
3+
// RUN: %clang -### -fsycl --no-offload-new-driver \
4+
// RUN: -fsycl-targets=spir64_gen -foffload-fp32-prec-div %s 2>&1 \
5+
// RUN: | FileCheck -check-prefix=AOT %s
6+
7+
// RUN: %clang -### -fsycl --no-offload-new-driver \
8+
// RUN: -foffload-fp32-prec-div %s 2>&1 \
9+
// RUN: | FileCheck -check-prefix=JIT %s
10+
11+
// AOT: "ocloc" "-output"{{.*}} "-options" "-ze-fp32-correctly-rounded-divide-sqrt"
12+
13+
// JIT: clang-offload-wrapper{{.*}} "-compile-opts={{.*}}-foffload-fp32-prec-div"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Test SYCL -foffload-fp32-prec-sqrt
2+
3+
// RUN: %clang -### -fsycl --no-offload-new-driver \
4+
// RUN: -fsycl-targets=spir64_gen -foffload-fp32-prec-sqrt %s 2>&1 \
5+
// RUN: | FileCheck -check-prefix=AOT %s
6+
7+
// RUN: %clang -### -fsycl --no-offload-new-driver \
8+
// RUN: -foffload-fp32-prec-sqrt %s 2>&1 \
9+
// RUN: | FileCheck -check-prefix=JIT %s
10+
11+
// AOT: "ocloc" "-output"{{.*}} "-options" "-ze-fp32-correctly-rounded-divide-sqrt"
12+
13+
// JIT: clang-offload-wrapper{{.*}} "-compile-opts={{.*}}-foffload-fp32-prec-div"

sycl/test-e2e/KernelAndProgram/fp32-precise-fdiv.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1-
// RUN: %{build} -Wno-error=unused-command-line-argument -foffload-fp32-prec-div -o %t_with.out
1+
// RUN: %{build} -Wno-error=unused-command-line-argument -foffload-fp32-prec-div -foffload-fp32-prec-sqrt -o %t_with.out
2+
// RUN: %{build} -Wno-error=unused-command-line-argument -foffload-fp32-prec-div -o %t_with_div.out
3+
// RUN: %{build} -Wno-error=unused-command-line-argument -foffload-fp32-prec-sqrt -o %t_with_sqrt.out
24
// RUN: %{build} -o %t_without.out
35

46
// RUN: env SYCL_UR_TRACE=2 %{run} %t_with.out 2>&1 | FileCheck %if hip || cuda %{ --check-prefix=CHECK-WITHOUT %} %else %{ --check-prefix=CHECK-WITH %} %s
5-
// RUN: env SYCL_UR_TRACE=2 %{run} %t_without.out 2>&1 | FileCheck --implicit-check-not=fp32-correctly-rounded-divide-div
7+
// RUN: env SYCL_UR_TRACE=2 %{run} %t_with_div.out 2>&1 | FileCheck %if hip || cuda %{ --check-prefix=CHECK-WITHOUT %} %else %{ --check-prefix=CHECK-WITH %} %s
8+
// RUN: env SYCL_UR_TRACE=2 %{run} %t_with_sqrt.out 2>&1 | FileCheck %if hip || cuda %{ --check-prefix=CHECK-WITHOUT %} %else %{ --check-prefix=CHECK-WITH %} %s
9+
// RUN: env SYCL_UR_TRACE=2 %{run} %t_without.out 2>&1 | FileCheck --implicit-check-not=fp32-correctly-rounded-divide-sqrt %s
610

7-
// CHECK-INTEL-WITH: <--- urProgramBuild
8-
// CHECK-INTEL-WITH-SAME: fp32-correctly-rounded-divide-div
11+
// CHECK-WITH: <--- urProgramBuild
12+
// CHECK-WITH-SAME: fp32-correctly-rounded-divide-sqrt
913

10-
// CHECK-WITHOUT-NOT: <--- urProgramBuild{{.*}}fp32-correctly-rounded-divide-div{{.*}} -> UR_RESULT_SUCCESS
14+
// CHECK-WITHOUT-NOT: <--- urProgramBuild{{.*}}fp32-correctly-rounded-divide-sqrt{{.*}} -> UR_RESULT_SUCCESS
1115
// CHECK-WITHOUT: <--- urProgramBuild{{.*}} -> UR_RESULT_SUCCESS
1216

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

sycl/test-e2e/KernelAndProgram/fp32-precise-sqrt.cpp

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)