Skip to content

Commit c946286

Browse files
authored
[SYCL] Change f[no-]sycl-device-lib-online-link to f[no-]sycl-device-lib-jit-link (#6253)
For users, the terms "JIT" and "AOT" have been consistently used to refer to things happening at run-time versus compile-time. Use "jit-link" can be easier to understand. Signed-off-by: jinge90 <[email protected]>
1 parent f3a0970 commit c946286

File tree

5 files changed

+22
-22
lines changed

5 files changed

+22
-22
lines changed

clang/include/clang/Driver/Options.td

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4913,12 +4913,12 @@ def fno_sycl_device_lib_EQ : CommaJoined<["-"], "fno-sycl-device-lib=">, Group<s
49134913
Values<"libc, libm-fp32, libm-fp64, all">, HelpText<"Control exclusion of "
49144914
"device libraries from device binary linkage. Valid arguments "
49154915
"are libc, libm-fp32, libm-fp64, all">;
4916-
def fsycl_device_lib_online_link : Flag<["-"], "fsycl-device-lib-online-link">,
4916+
def fsycl_device_lib_jit_link : Flag<["-"], "fsycl-device-lib-jit-link">,
49174917
Group<sycl_Group>, Flags<[NoArgumentUnused, CoreOption]>, HelpText<"Enables "
4918-
"sycl device library online link (experimental)">;
4919-
def fno_sycl_device_lib_online_link : Flag<["-"], "fno-sycl-device-lib-online-link">,
4918+
"sycl device library jit link (experimental)">;
4919+
def fno_sycl_device_lib_jit_link : Flag<["-"], "fno-sycl-device-lib-jit-link">,
49204920
Group<sycl_Group>, Flags<[NoArgumentUnused, CoreOption]>, HelpText<"Disables "
4921-
"sycl device library online link (experimental)">;
4921+
"sycl device library jit link (experimental)">;
49224922
def fsycl_fp32_prec_sqrt : Flag<["-"], "fsycl-fp32-prec-sqrt">, Group<sycl_Group>, Flags<[CC1Option]>,
49234923
HelpText<"SYCL only. Specify that single precision floating-point sqrt is correctly rounded.">,
49244924
MarshallingInfoFlag<CodeGenOpts<"SYCLFp32PrecSqrt">>;

clang/lib/Driver/Driver.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5009,12 +5009,12 @@ class OffloadingActionBuilder final {
50095009
// device libraries are only needed when current toolchain is using
50105010
// AOT compilation.
50115011
if (isSPIR) {
5012-
bool UseOnlineLink =
5013-
Args.hasFlag(options::OPT_fsycl_device_lib_online_link,
5014-
options::OPT_fno_sycl_device_lib_online_link, false);
5015-
bool UseOfflineLink = isSpirvAOT || !UseOnlineLink;
5012+
bool UseJitLink =
5013+
Args.hasFlag(options::OPT_fsycl_device_lib_jit_link,
5014+
options::OPT_fno_sycl_device_lib_jit_link, false);
5015+
bool UseAOTLink = isSpirvAOT || !UseJitLink;
50165016
SYCLDeviceLibLinked = addSYCLDeviceLibs(
5017-
TC, FullLinkObjects, UseOfflineLink,
5017+
TC, FullLinkObjects, UseAOTLink,
50185018
C.getDefaultToolChain().getTriple().isWindowsMSVCEnvironment());
50195019
}
50205020

clang/test/Driver/sycl-device-lib-win.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66

77
/// ###########################################################################
88

9-
/// test behavior of device library default link and fno-sycl-device-lib-online-link
9+
/// test behavior of device library default link and fno-sycl-device-lib-jit-link
1010
// RUN: %clangxx -fsycl %s --sysroot=%S/Inputs/SYCL-windows -### 2>&1 \
1111
// RUN: | FileCheck %s -check-prefix=SYCL_DEVICE_LIB_UNBUNDLE_DEFAULT
12-
// RUN: %clangxx -fsycl -fno-sycl-device-lib-online-link %s --sysroot=%S/Inputs/SYCL-windows -### 2>&1 \
12+
// RUN: %clangxx -fsycl -fno-sycl-device-lib-jit-link %s --sysroot=%S/Inputs/SYCL-windows -### 2>&1 \
1313
// RUN: | FileCheck %s -check-prefix=SYCL_DEVICE_LIB_UNBUNDLE_DEFAULT
1414
// RUN: %clangxx -fsycl %s -fsycl-device-lib=libc --sysroot=%S/Inputs/SYCL-windows -### 2>&1 \
1515
// RUN: | FileCheck %s -check-prefix=SYCL_DEVICE_LIB_UNBUNDLE_DEFAULT
16-
// RUN: %clangxx -fsycl -fno-sycl-device-lib-online-link %s -fsycl-device-lib=libc --sysroot=%S/Inputs/SYCL-windows -### 2>&1 \
16+
// RUN: %clangxx -fsycl -fno-sycl-device-lib-jit-link %s -fsycl-device-lib=libc --sysroot=%S/Inputs/SYCL-windows -### 2>&1 \
1717
// RUN: | FileCheck %s -check-prefix=SYCL_DEVICE_LIB_UNBUNDLE_DEFAULT
1818
// RUN: %clangxx -fsycl %s -fsycl-device-lib=libm-fp32 --sysroot=%S/Inputs/SYCL-windows -### 2>&1 \
1919
// RUN: | FileCheck %s -check-prefix=SYCL_DEVICE_LIB_UNBUNDLE_DEFAULT
@@ -32,8 +32,8 @@
3232
// SYCL_DEVICE_LIB_UNBUNDLE_DEFAULT-NEXT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-fallback-cmath-fp64.obj" "-output={{.*}}libsycl-fallback-cmath-fp64-{{.*}}.o" "-unbundle"
3333

3434
/// ###########################################################################
35-
/// test sycl fallback device libraries are not linked when using online link.
36-
// RUN: %clangxx -fsycl -fsycl-device-lib-online-link %s --sysroot=%S/Inputs/SYCL-windows -### 2>&1 \
35+
/// test sycl fallback device libraries are not linked when using jit link.
36+
// RUN: %clangxx -fsycl -fsycl-device-lib-jit-link %s --sysroot=%S/Inputs/SYCL-windows -### 2>&1 \
3737
// RUN: | FileCheck %s -check-prefix=SYCL_DEVICE_LIB_NO_FALLBACK
3838
// SYCL_DEVICE_LIB_NO_FALLBACK: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-crt.obj" "-output={{.*}}libsycl-crt-{{.*}}.o" "-unbundle"
3939
// SYCL_DEVICE_LIB_NO_FALLBACK-NOT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-fallback-{{.*}}.obj"

clang/test/Driver/sycl-device-lib.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66

77
/// ###########################################################################
88

9-
/// test behavior of device library default link and fno-sycl-device-lib-online-link
9+
/// test behavior of device library default link and fno-sycl-device-lib-jit-link
1010
// RUN: %clangxx -fsycl %s --sysroot=%S/Inputs/SYCL -### 2>&1 \
1111
// RUN: | FileCheck %s -check-prefix=SYCL_DEVICE_LIB_UNBUNDLE_DEFAULT
12-
// RUN: %clangxx -fsycl -fno-sycl-device-lib-online-link %s --sysroot=%S/Inputs/SYCL -### 2>&1 \
12+
// RUN: %clangxx -fsycl -fno-sycl-device-lib-jit-link %s --sysroot=%S/Inputs/SYCL -### 2>&1 \
1313
// RUN: | FileCheck %s -check-prefix=SYCL_DEVICE_LIB_UNBUNDLE_DEFAULT
1414
// RUN: %clangxx -fsycl %s -fsycl-device-lib=libc --sysroot=%S/Inputs/SYCL -### 2>&1 \
1515
// RUN: | FileCheck %s -check-prefix=SYCL_DEVICE_LIB_UNBUNDLE_DEFAULT
16-
// RUN: %clangxx -fsycl -fno-sycl-device-lib-online-link %s -fsycl-device-lib=libc --sysroot=%S/Inputs/SYCL -### 2>&1 \
16+
// RUN: %clangxx -fsycl -fno-sycl-device-lib-jit-link %s -fsycl-device-lib=libc --sysroot=%S/Inputs/SYCL -### 2>&1 \
1717
// RUN: | FileCheck %s -check-prefix=SYCL_DEVICE_LIB_UNBUNDLE_DEFAULT
1818
// RUN: %clangxx -fsycl %s -fsycl-device-lib=libm-fp32 --sysroot=%S/Inputs/SYCL -### 2>&1 \
1919
// RUN: | FileCheck %s -check-prefix=SYCL_DEVICE_LIB_UNBUNDLE_DEFAULT
@@ -33,7 +33,7 @@
3333

3434
/// ###########################################################################
3535
/// test sycl fallback device libraries are not linked by default
36-
// RUN: %clangxx -fsycl -fsycl-device-lib-online-link %s --sysroot=%S/Inputs/SYCL -### 2>&1 \
36+
// RUN: %clangxx -fsycl -fsycl-device-lib-jit-link %s --sysroot=%S/Inputs/SYCL -### 2>&1 \
3737
// RUN: | FileCheck %s -check-prefix=SYCL_DEVICE_LIB_NO_FALLBACK
3838
// SYCL_DEVICE_LIB_NO_FALLBACK: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-crt.o" "-output={{.*}}libsycl-crt-{{.*}}.o" "-unbundle"
3939
// SYCL_DEVICE_LIB_NO_FALLBACK-NOT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-fallback-{{.*}}.o"

sycl/doc/UsersManual.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,12 @@ and not recommended to use in production environment.
201201
libm-fp32, libm-fp64, libc, all. Use of 'all' will enable/disable all of
202202
the device libraries.
203203

204-
**`-f[no-]sycl-device-lib-online-link`** [EXPERIMENTAL]
204+
**`-f[no-]sycl-device-lib-jit-link`** [EXPERIMENTAL]
205205

206-
Enables/disables online link mechanism for SYCL device library in JIT
207-
compilation. If online link is enabled, all required device libraries will
206+
Enables/disables jit link mechanism for SYCL device library in JIT
207+
compilation. If jit link is enabled, all required device libraries will
208208
be linked with user's device image by SYCL runtime during execution time,
209-
otherwise the link will happen in build time, online link is disabled by
209+
otherwise the link will happen in build time, jit link is disabled by
210210
default currently. This option is ignored in AOT compilation.
211211

212212
**`-f[no-]sycl-instrument-device-code`** [EXPERIMENTAL]

0 commit comments

Comments
 (0)