File tree Expand file tree Collapse file tree 5 files changed +32
-1
lines changed Expand file tree Collapse file tree 5 files changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -143,7 +143,13 @@ function(build_dpctl_ext _trgt _src _dest)
143
143
add_custom_target (${_cythonize_trgt} DEPENDS ${_src} )
144
144
Python_add_library (${_trgt} MODULE WITH_SOABI ${_generated_src} )
145
145
if (BUILD_DPCTL_EXT_SYCL )
146
- add_sycl_to_target (TARGET ${_trgt} SOURCES ${_generated_src} )
146
+ add_sycl_to_target (TARGET ${_trgt} SOURCES ${_generated_src} )
147
+ # make fat binary
148
+ target_compile_options (
149
+ ${_trgt}
150
+ PRIVATE
151
+ -fsycl-targets=spir64-unknown-unknown,nvptx64-nvidia-cuda
152
+ )
147
153
endif ()
148
154
target_include_directories (${_trgt} PRIVATE ${NumPy_INCLUDE_DIR} ${DPCTL_INCLUDE_DIR} )
149
155
add_dependencies (${_trgt} _build_time_create_dpctl_include_copy ${_cythonize_trgt} )
Original file line number Diff line number Diff line change @@ -141,6 +141,13 @@ list(APPEND _tensor_impl_sources
141
141
set (python_module_name _tensor_impl )
142
142
pybind11_add_module (${python_module_name} MODULE ${_tensor_impl_sources} )
143
143
add_sycl_to_target (TARGET ${python_module_name} SOURCES ${_tensor_impl_sources} )
144
+ # make fat binary
145
+ target_compile_options (
146
+ ${python_module_name}
147
+ PRIVATE
148
+ -fsycl-targets=spir64-unknown-unknown,nvptx64-nvidia-cuda
149
+ )
150
+
144
151
set (_clang_prefix "" )
145
152
if (WIN32 )
146
153
set (_clang_prefix "/clang:" )
Original file line number Diff line number Diff line change @@ -21,6 +21,12 @@ pybind11_add_module(${python_module_name} MODULE
21
21
${_module_src}
22
22
)
23
23
add_sycl_to_target (TARGET ${python_module_name} SOURCES ${_module_src} )
24
+ # make fat binary
25
+ target_compile_options (
26
+ ${python_module_name}
27
+ PRIVATE
28
+ -fsycl-targets=spir64-unknown-unknown,nvptx64-nvidia-cuda
29
+ )
24
30
target_include_directories (${python_module_name}
25
31
PRIVATE
26
32
${CMAKE_CURRENT_SOURCE_DIR} /../include
Original file line number Diff line number Diff line change @@ -205,6 +205,12 @@ add_library(DPCTLSyclInterface
205
205
${helper_sources}
206
206
)
207
207
add_sycl_to_target (TARGET DPCTLSyclInterface SOURCES ${sources} ${helper_sources} )
208
+ # make fat binary
209
+ target_compile_options (
210
+ DPCTLSyclInterface
211
+ PRIVATE
212
+ -fsycl-targets=spir64-unknown-unknown,nvptx64-nvidia-cuda
213
+ )
208
214
209
215
if (DPCTL_GENERATE_COVERAGE )
210
216
target_link_options (DPCTLSyclInterface
Original file line number Diff line number Diff line change @@ -52,6 +52,12 @@ add_sycl_to_target(
52
52
${CMAKE_CURRENT_SOURCE_DIR} /test_sycl_queue_interface.cpp
53
53
${CMAKE_CURRENT_SOURCE_DIR} /test_sycl_usm_interface.cpp
54
54
)
55
+ # make fat binary
56
+ target_compile_options (
57
+ dpctl_c_api_tests
58
+ PRIVATE
59
+ -fsycl-targets=spir64-unknown-unknown,nvptx64-nvidia-cuda
60
+ )
55
61
56
62
if (DPCTL_GENERATE_COVERAGE )
57
63
target_include_directories (dpctl_c_api_tests
You can’t perform that action at this time.
0 commit comments