Skip to content

Commit 4be73ad

Browse files
author
Andrew Savonichev
committed
Apply CR comments
Signed-off-by: Andrew Savonichev <[email protected]>
1 parent f4354e5 commit 4be73ad

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

libdevice/cmake/modules/SYCLLibdevice.cmake

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ if (WIN32)
3333
${CMAKE_CURRENT_SOURCE_DIR}/msvc_wrapper.cpp
3434
-o ${devicelib-obj-file}
3535
MAIN_DEPENDENCY msvc_wrapper.cpp
36-
DEPENDS wrapper.h device.h spirv_vars.h clang
36+
DEPENDS wrapper.h device.h spirv_vars.h clang clang-offload-bundler
3737
VERBATIM)
3838
else()
3939
set(devicelib-obj-file ${binary_dir}/libsycl-glibc.o)
@@ -43,7 +43,7 @@ else()
4343
${CMAKE_CURRENT_SOURCE_DIR}/glibc_wrapper.cpp
4444
-o ${devicelib-obj-file}
4545
MAIN_DEPENDENCY glibc_wrapper.cpp
46-
DEPENDS wrapper.h device.h spirv_vars.h clang
46+
DEPENDS wrapper.h device.h spirv_vars.h clang clang-offload-bundler
4747
VERBATIM)
4848
endif()
4949

@@ -54,7 +54,7 @@ add_custom_command(OUTPUT ${devicelib-obj-complex}
5454
${CMAKE_CURRENT_SOURCE_DIR}/complex_wrapper.cpp
5555
-o ${devicelib-obj-complex}
5656
MAIN_DEPENDENCY complex_wrapper.cpp
57-
DEPENDS device_complex.h device.h clang
57+
DEPENDS device_complex.h device.h clang clang-offload-bundler
5858
VERBATIM)
5959

6060
set(devicelib-obj-complex-fp64 ${binary_dir}/libsycl-complex-fp64.o)
@@ -64,7 +64,7 @@ add_custom_command(OUTPUT ${devicelib-obj-complex-fp64}
6464
${CMAKE_CURRENT_SOURCE_DIR}/complex_wrapper_fp64.cpp
6565
-o ${devicelib-obj-complex-fp64}
6666
MAIN_DEPENDENCY complex_wrapper_fp64.cpp
67-
DEPENDS device_complex.h device.h clang
67+
DEPENDS device_complex.h device.h clang clang-offload-bundler
6868
VERBATIM)
6969

7070
set(devicelib-obj-cmath ${binary_dir}/libsycl-cmath.o)
@@ -74,7 +74,7 @@ add_custom_command(OUTPUT ${devicelib-obj-cmath}
7474
${CMAKE_CURRENT_SOURCE_DIR}/cmath_wrapper.cpp
7575
-o ${devicelib-obj-cmath}
7676
MAIN_DEPENDENCY cmath_wrapper.cpp
77-
DEPENDS device_math.h device.h clang
77+
DEPENDS device_math.h device.h clang clang-offload-bundler
7878
VERBATIM)
7979

8080
set(devicelib-obj-cmath-fp64 ${binary_dir}/libsycl-cmath-fp64.o)
@@ -84,7 +84,7 @@ add_custom_command(OUTPUT ${devicelib-obj-cmath-fp64}
8484
${CMAKE_CURRENT_SOURCE_DIR}/cmath_wrapper_fp64.cpp
8585
-o ${devicelib-obj-cmath-fp64}
8686
MAIN_DEPENDENCY cmath_wrapper_fp64.cpp
87-
DEPENDS device_math.h device.h clang
87+
DEPENDS device_math.h device.h clang clang-offload-bundler
8888
VERBATIM)
8989

9090
add_custom_command(OUTPUT ${binary_dir}/libsycl-fallback-cassert.spv
@@ -102,7 +102,7 @@ add_custom_command(OUTPUT ${binary_dir}/libsycl-fallback-cassert.o
102102
${CMAKE_CURRENT_SOURCE_DIR}/fallback-cassert.cpp
103103
-o ${binary_dir}/libsycl-fallback-cassert.o
104104
MAIN_DEPENDENCY fallback-cassert.cpp
105-
DEPENDS wrapper.h device.h clang spirv_vars.h
105+
DEPENDS wrapper.h device.h clang spirv_vars.h clang-offload-bundler
106106
VERBATIM)
107107

108108
add_custom_command(OUTPUT ${binary_dir}/libsycl-fallback-complex.spv
@@ -111,7 +111,7 @@ add_custom_command(OUTPUT ${binary_dir}/libsycl-fallback-complex.spv
111111
${CMAKE_CURRENT_SOURCE_DIR}/fallback-complex.cpp
112112
-o ${binary_dir}/libsycl-fallback-complex.spv
113113
MAIN_DEPENDENCY fallback-complex.cpp
114-
DEPENDS device_math.h device_complex.h device.h clang llvm-spirv
114+
DEPENDS device_math.h device_complex.h device.h clang llvm-spirv clang-offload-bundler
115115
VERBATIM)
116116

117117
add_custom_command(OUTPUT ${binary_dir}/libsycl-fallback-complex.o
@@ -120,7 +120,7 @@ add_custom_command(OUTPUT ${binary_dir}/libsycl-fallback-complex.o
120120
${CMAKE_CURRENT_SOURCE_DIR}/fallback-complex.cpp
121121
-o ${binary_dir}/libsycl-fallback-complex.o
122122
MAIN_DEPENDENCY fallback-complex.cpp
123-
DEPENDS device_math.h device_complex.h device.h clang
123+
DEPENDS device_math.h device_complex.h device.h clang clang-offload-bundler
124124
VERBATIM)
125125

126126
add_custom_command(OUTPUT ${binary_dir}/libsycl-fallback-complex-fp64.spv
@@ -138,7 +138,7 @@ add_custom_command(OUTPUT ${binary_dir}/libsycl-fallback-complex-fp64.o
138138
${CMAKE_CURRENT_SOURCE_DIR}/fallback-complex-fp64.cpp
139139
-o ${binary_dir}/libsycl-fallback-complex-fp64.o
140140
MAIN_DEPENDENCY fallback-complex-fp64.cpp
141-
DEPENDS device_math.h device_complex.h device.h clang
141+
DEPENDS device_math.h device_complex.h device.h clang clang-offload-bundler
142142
VERBATIM)
143143

144144
add_custom_command(OUTPUT ${binary_dir}/libsycl-fallback-cmath.spv
@@ -156,7 +156,7 @@ add_custom_command(OUTPUT ${binary_dir}/libsycl-fallback-cmath.o
156156
${CMAKE_CURRENT_SOURCE_DIR}/fallback-cmath.cpp
157157
-o ${binary_dir}/libsycl-fallback-cmath.o
158158
MAIN_DEPENDENCY fallback-cmath.cpp
159-
DEPENDS device_math.h device.h clang
159+
DEPENDS device_math.h device.h clang clang-offload-bundler
160160
VERBATIM)
161161

162162
add_custom_command(OUTPUT ${binary_dir}/libsycl-fallback-cmath-fp64.spv
@@ -174,7 +174,7 @@ add_custom_command(OUTPUT ${binary_dir}/libsycl-fallback-cmath-fp64.o
174174
${CMAKE_CURRENT_SOURCE_DIR}/fallback-cmath-fp64.cpp
175175
-o ${binary_dir}/libsycl-fallback-cmath-fp64.o
176176
MAIN_DEPENDENCY fallback-cmath-fp64.cpp
177-
DEPENDS device_math.h device.h clang
177+
DEPENDS device_math.h device.h clang clang-offload-bundler
178178
VERBATIM)
179179

180180
add_custom_target(libsycldevice-obj DEPENDS

sycl/doc/extensions/C-CXX-StandardLibrary/C-CXX-StandardLibrary.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ Every set of functions is implemented in a separate fallback
280280
library. For example, a fallback for `cl_intel_devicelib_cassert`
281281
extension is provided as `libsycl-fallback-cassert.spv`
282282

283-
For AOT compilation, fallback libraries are also provided as object
284-
files (e.g. `libsycl-fallback-cassert.o`). Device code in these object
285-
files is identical to the the `*.spv` files.
283+
For AOT compilation, fallback libraries are provided as object files
284+
(e.g. `libsycl-fallback-cassert.o`) which contain device code in LLVM
285+
IR format. Device code in these object files is equivalent to device
286+
code in the `*.spv` files.

0 commit comments

Comments
 (0)