Skip to content

Commit 02fa4de

Browse files
Set SYCL_EXT_ONEAPI_COMPLEX on Windows as well
1 parent 9a3a6d6 commit 02fa4de

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Diff for: dpctl/tensor/CMakeLists.txt

+8-3
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,15 @@ set_source_files_properties(
6262
${CMAKE_CURRENT_SOURCE_DIR}/libtensor/source/elementwise_functions.cpp
6363
PROPERTIES COMPILE_OPTIONS "${_clang_prefix}-fno-fast-math")
6464
if (UNIX)
65-
set_source_files_properties(
66-
${CMAKE_CURRENT_SOURCE_DIR}/libtensor/source/elementwise_functions.cpp
67-
PROPERTIES COMPILE_DEFINITIONS "USE_STD_ABS_FOR_COMPLEX_TYPES;USE_STD_SQRT_FOR_COMPLEX_TYPES;SYCL_EXT_ONEAPI_COMPLEX")
65+
set(_compiler_definitions "USE_STD_ABS_FOR_COMPLEX_TYPES;USE_STD_SQRT_FOR_COMPLEX_TYPES;SYCL_EXT_ONEAPI_COMPLEX")
66+
else()
67+
set(_compiler_definitions "SYCL_EXT_ONEAPI_COMPLEX")
6868
endif()
69+
set_source_files_properties(
70+
${CMAKE_CURRENT_SOURCE_DIR}/libtensor/source/elementwise_functions.cpp
71+
PROPERTIES COMPILE_DEFINITIONS "${_compiler_definitions}"
72+
)
73+
6974
target_compile_options(${python_module_name} PRIVATE -fno-sycl-id-queries-fit-in-int)
7075
target_link_options(${python_module_name} PRIVATE -fsycl-device-code-split=per_kernel)
7176
if(UNIX)

0 commit comments

Comments
 (0)