Skip to content

Commit bf1a35b

Browse files
Set SYCL_EXT_ONEAPI_COMPLEX on Windows as well
1 parent 5eb884e commit bf1a35b

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

dpctl/tensor/CMakeLists.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,15 @@ foreach(_src_fn ${_no_fast_math_sources})
7575
)
7676
endforeach()
7777
if (UNIX)
78-
set_source_files_properties(
79-
${CMAKE_CURRENT_SOURCE_DIR}/libtensor/source/elementwise_functions.cpp
80-
PROPERTIES COMPILE_DEFINITIONS "USE_STD_ABS_FOR_COMPLEX_TYPES;USE_STD_SQRT_FOR_COMPLEX_TYPES;SYCL_EXT_ONEAPI_COMPLEX")
78+
set(_compiler_definitions "USE_STD_ABS_FOR_COMPLEX_TYPES;USE_STD_SQRT_FOR_COMPLEX_TYPES;SYCL_EXT_ONEAPI_COMPLEX")
79+
else()
80+
set(_compiler_definitions "SYCL_EXT_ONEAPI_COMPLEX")
8181
endif()
82+
set_source_files_properties(
83+
${CMAKE_CURRENT_SOURCE_DIR}/libtensor/source/elementwise_functions.cpp
84+
PROPERTIES COMPILE_DEFINITIONS "${_compiler_definitions}"
85+
)
86+
8287
target_compile_options(${python_module_name} PRIVATE -fno-sycl-id-queries-fit-in-int)
8388
target_link_options(${python_module_name} PRIVATE -fsycl-device-code-split=per_kernel)
8489
if(UNIX)

0 commit comments

Comments
 (0)