Skip to content

Commit bcd88e7

Browse files
authored
[SYCL][Driver] Mark DeviceLib option as deprecated (#18581)
We decide to remove sycl device library jit link path, the 1st step is to mark all related driver option as 'deprecated' and cleared all tests using these options. --------- Signed-off-by: jinge90 <ge.jin@intel.com>
1 parent 73da6e2 commit bcd88e7

24 files changed

+39
-28
lines changed

clang/include/clang/Driver/Options.td

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7091,19 +7091,22 @@ def fsycl_dead_args_optimization : Flag<["-"], "fsycl-dead-args-optimization">,
70917091
def fno_sycl_dead_args_optimization : Flag<["-"], "fno-sycl-dead-args-optimization">,
70927092
HelpText<"Disables elimination of DPC++ dead kernel arguments">;
70937093
def fsycl_device_lib_EQ : CommaJoined<["-"], "fsycl-device-lib=">,
7094-
Flags<[NoXarchOption]>,
7094+
Flags<[Deprecated]>,
70957095
Values<"libc,libm-fp32,libm-fp64,libimf-fp32,libimf-fp64,libimf-bf16,all">,
70967096
HelpText<"Control inclusion of device libraries into device binary linkage. "
70977097
"Valid arguments are libc, libm-fp32, libm-fp64, libimf-fp32, "
7098-
"libimf-fp64, libimf-bf16, all">;
7098+
"libimf-fp64, libimf-bf16, all. (deprecated)">;
70997099
def fno_sycl_device_lib_EQ : CommaJoined<["-"], "fno-sycl-device-lib=">,
7100-
Flags<[NoXarchOption]>, Values<"libc, libm-fp32, libm-fp64, all">,
7100+
Flags<[Deprecated]>,
7101+
Values<"libc, libm-fp32, libm-fp64, all">,
71017102
HelpText<"Control exclusion of device libraries from device binary linkage. "
7102-
"Valid arguments are libc, libm-fp32, libm-fp64, all">;
7103+
"Valid arguments are libc, libm-fp32, libm-fp64, all. (deprecated)">;
71037104
def fsycl_device_lib_jit_link : Flag<["-"], "fsycl-device-lib-jit-link">,
7104-
HelpText<"Enables sycl device library jit link (experimental)">;
7105+
Flags<[Deprecated]>,
7106+
HelpText<"Enables sycl device library jit link. (deprecated)">;
71057107
def fno_sycl_device_lib_jit_link : Flag<["-"], "fno-sycl-device-lib-jit-link">,
7106-
HelpText<"Disables sycl device library jit link (experimental)">;
7108+
Flags<[Deprecated]>,
7109+
HelpText<"Disables sycl device library jit link. (deprecated)">;
71077110
def fsycl_fp32_prec_sqrt : Flag<["-"], "fsycl-fp32-prec-sqrt">,
71087111
Alias<foffload_fp32_prec_sqrt>, Flags<[Deprecated]>,
71097112
Visibility<[ClangOption, CC1Option]>, HelpText<"SYCL only. Specify that "

clang/test/Driver/sycl-deprecated.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,11 @@
1212
// RUN: %clangxx -fsycl -fsycl-fp32-prec-sqrt %s -### 2>&1 | FileCheck %s --check-prefix=CHECK_REPLACE -DOPTION=-fsycl-fp32-prec-sqrt -DOPTION_REPLACE=-foffload-fp32-prec-sqrt
1313
// RUN: %clangxx -fsycl -fsycl-dump-device-code=/path/to/spv/ %s -### 2>&1 | FileCheck %s --check-prefix=CHECK_REPLACE -DOPTION=-fsycl-dump-device-code=/path/to/spv/ -DOPTION_REPLACE=-save-offload-code=/path/to/spv/
1414
// CHECK_REPLACE: option '[[OPTION]]' is deprecated and will be removed in a future release, use '[[OPTION_REPLACE]]' instead
15+
16+
// RUN: %clangxx -fsycl -fsycl-device-lib-jit-link %s -### 2>&1 \
17+
// RUN: | FileCheck %s --check-prefix=CHECK -DOPTION=-fsycl-device-lib-jit-link
18+
// RUN: %clangxx -fsycl -fsycl-device-lib=libc %s -### 2>&1 \
19+
// RUN: | FileCheck %s --check-prefix=CHECK -DOPTION=-fsycl-device-lib=libc
20+
// RUN: %clangxx -fsycl -fno-sycl-device-lib=libc %s -### 2>&1 \
21+
// RUN: | FileCheck %s --check-prefix=CHECK -DOPTION=-fno-sycl-device-lib=libc
22+

sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/math_device_lib.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%}
44

5-
// RUN: %{build} --offload-new-driver -fsycl-allow-device-image-dependencies %if target-spir %{ -fsycl-device-lib-jit-link %} %{mathflags} -o %t.out
5+
// RUN: %{build} --offload-new-driver -fsycl-allow-device-image-dependencies %if target-spir %{ -fsycl-device-lib-jit-link -Wno-deprecated %} %{mathflags} -o %t.out
66
// RUN: %{run} %t.out
77

88
#include <cmath>

sycl/test-e2e/DeviceImageDependencies/math_device_lib.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%}
44

5-
// RUN: %{build} -fsycl-allow-device-image-dependencies %if target-spir %{ -fsycl-device-lib-jit-link %} %{mathflags} -o %t.out
5+
// RUN: %{build} -fsycl-allow-device-image-dependencies %if target-spir %{ -fsycl-device-lib-jit-link -Wno-deprecated %} %{mathflags} -o %t.out
66
// RUN: %{run} %t.out
77

88
#include <cmath>

sycl/test-e2e/DeviceLib/cmath_fp64_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// RUN: %{build} %{mathflags} -o %t1.out
88
// RUN: %{run} %t1.out
99

10-
// RUN: %if target-spir %{ %{build} -fsycl-device-lib-jit-link %{mathflags} -o %t2.out %}
10+
// RUN: %if target-spir %{ %{build} -fsycl-device-lib-jit-link -Wno-deprecated %{mathflags} -o %t2.out %}
1111
// RUN: %if target-spir %{ %{run} %t2.out %}
1212

1313
#include "math_utils.hpp"

sycl/test-e2e/DeviceLib/cmath_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// RUN: %{build} -fno-builtin %{mathflags} -o %t1.out
66
// RUN: %{run} %t1.out
77

8-
// RUN: %if target-spir %{ %{build} -fno-builtin -fsycl-device-lib-jit-link %{mathflags} -o %t2.out %}
8+
// RUN: %if target-spir %{ %{build} -fno-builtin -fsycl-device-lib-jit-link -Wno-deprecated %{mathflags} -o %t2.out %}
99
// RUN: %if target-spir && !gpu %{ %{run} %t2.out %}
1010
//
1111
// // Check that --fast-math works with cmath funcs for CUDA

sycl/test-e2e/DeviceLib/imf_bfloat16_integeral_convesions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %{build} -o %t1.out
22
// RUN: %{run} %t1.out
33

4-
// RUN: %{build} -fno-builtin %if target-spir %{ -fsycl-device-lib-jit-link %} -o %t2.out
4+
// RUN: %{build} -fno-builtin %if target-spir %{ -fsycl-device-lib-jit-link -Wno-deprecated %} -o %t2.out
55
// RUN: %{run} %t2.out
66
//
77
// UNSUPPORTED: target-nvidia || target-amd

sycl/test-e2e/DeviceLib/imf_double2bfloat16.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// RUN: %{build} -o %t.out
44
// RUN: %{run} %t.out
55

6-
// RUN: %{build} -fno-builtin %if target-spir %{ -fsycl-device-lib-jit-link %} -o %t1.out
6+
// RUN: %{build} -fno-builtin %if target-spir %{ -fsycl-device-lib-jit-link -Wno-deprecated %} -o %t1.out
77
// RUN: %{run} %t1.out
88
//
99
// UNSUPPORTED: target-nvidia || target-amd

sycl/test-e2e/DeviceLib/imf_double2half.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// RUN: %{build} -o %t1.out
55
// RUN: %{run} %t1.out
66

7-
// RUN: %{build} -fno-builtin %if target-spir %{ -fsycl-device-lib-jit-link %} -o %t2.out
7+
// RUN: %{build} -fno-builtin %if target-spir %{ -fsycl-device-lib-jit-link -Wno-deprecated %} -o %t2.out
88
// RUN: %{run} %t2.out
99

1010
// UNSUPPORTED: target-nvidia, target-amd

sycl/test-e2e/DeviceLib/imf_float2bfloat16.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %{build} -o %t1.out
22
// RUN: %{run} %t1.out
33

4-
// RUN: %{build} -fno-builtin %if target-spir %{ -fsycl-device-lib-jit-link %} -o %t2.out
4+
// RUN: %{build} -fno-builtin %if target-spir %{ -fsycl-device-lib-jit-link -Wno-deprecated %} -o %t2.out
55
// RUN: %{run} %t2.out
66
//
77
// UNSUPPORTED: target-nvidia || target-amd

0 commit comments

Comments
 (0)