Skip to content

Commit 49d12ec

Browse files
Need to set SYCL_EXT_ONEAPI_COMPLEX on all files from elementwise folder
1 parent 978e551 commit 49d12ec

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Diff for: dpctl/tensor/CMakeLists.txt

+8-4
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,14 @@ if (UNIX)
183183
else()
184184
set(_compiler_definitions "SYCL_EXT_ONEAPI_COMPLEX")
185185
endif()
186-
set_source_files_properties(
187-
${CMAKE_CURRENT_SOURCE_DIR}/libtensor/source/elementwise_functions.cpp
188-
PROPERTIES COMPILE_DEFINITIONS "${_compiler_definitions}"
189-
)
186+
foreach(_src_fn ${_elementwise_sources})
187+
get_source_file_property(_cmpl_options_defs ${_src_fn} COMPILE_DEFINITIONS)
188+
set(_combined_options_defs ${_cmpl_options_defs} "${_compiler_definitions}")
189+
set_source_files_properties(
190+
${_src_fn}
191+
PROPERTIES COMPILE_DEFINITIONS "${_combined_options_defs}"
192+
)
193+
endforeach()
190194

191195
target_compile_options(${python_module_name} PRIVATE -fno-sycl-id-queries-fit-in-int)
192196
target_link_options(${python_module_name} PRIVATE -fsycl-device-code-split=per_kernel)

0 commit comments

Comments
 (0)