@@ -224,7 +224,8 @@ endif()
224
224
225
225
# Determine Compiler Family
226
226
if (CXX_COMPILER_NAME STREQUAL "dpcpp" OR CXX_COMPILER_NAME STREQUAL "dpcpp.exe"
227
- OR CXX_COMPILER_NAME STREQUAL "icpx" OR CXX_COMPILER_NAME STREQUAL "icx.exe" )
227
+ OR CXX_COMPILER_NAME STREQUAL "icpx" OR CXX_COMPILER_NAME STREQUAL "icx.exe"
228
+ OR CXX_COMPILER_NAME STREQUAL "mpiicpx" OR CXX_COMPILER_NAME STREQUAL "mpiicx.bat" )
228
229
set (SYCL_COMPILER ON )
229
230
endif ()
230
231
if (C_COMPILER_NAME MATCHES "^clang" OR CXX_COMPILER_NAME MATCHES "^clang" )
@@ -408,7 +409,7 @@ endif()
408
409
409
410
# Define MKL_THREADING
410
411
# All APIs support sequential threading
411
- # SYCL API supports oneTBB and OpenMP threadings, but OpenMP threading might have composability problem on CPU device with other SYCL kernels
412
+ # SYCL API supports oneTBB and OpenMP threadings
412
413
if (SYCL_COMPILER )
413
414
set (MKL_SYCL_THREADING_LIST "sequential" "intel_thread" "tbb_thread" )
414
415
set (DEFAULT_MKL_SYCL_THREADING tbb_thread )
@@ -420,12 +421,6 @@ if(SYCL_COMPILER)
420
421
set (SYCL_COMPILER OFF )
421
422
mkl_message (STATUS "MKL::MKL_SYCL target will not be available." )
422
423
endif ()
423
- if (MKL_SYCL_THREADING STREQUAL "intel_thread" )
424
- mkl_message (STATUS "Using MKL::MKL_SYCL* targets with intel_thread may have potential composability problems on CPU device with other SYCL kernels." )
425
- add_custom_target (MKL_SYCL_MESSAGE
426
- COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --red
427
- "Warning: Using MKL::MKL_SYCL* targets with intel_thread may have potential composability problems on CPU device with other SYCL kernels." )
428
- endif ()
429
424
endif ()
430
425
# C, Fortran API
431
426
set (MKL_THREADING_LIST "sequential" "intel_thread" "tbb_thread" )
@@ -509,12 +504,20 @@ if(SYCL_COMPILER)
509
504
list (APPEND MKL_SYCL_COPT "-fsycl" )
510
505
list (APPEND MKL_SYCL_LOPT "-fsycl" )
511
506
if (MKL_SYCL_LINK STREQUAL "static" )
512
- list (APPEND MKL_SYCL_LOPT "-fsycl-device-code-split=per_kernel" )
507
+ if (WIN32 )
508
+ list (APPEND MKL_SYCL_LOPT "-fsycl-device-code-split:per_kernel" )
509
+ else ()
510
+ list (APPEND MKL_SYCL_LOPT "-fsycl-device-code-split=per_kernel" )
511
+ endif ()
513
512
endif ()
514
513
endif ()
515
514
if (ENABLE_OMP_OFFLOAD )
516
515
if (MKL_LINK STREQUAL "static" )
517
- list (APPEND MKL_OFFLOAD_LOPT "-fsycl-device-code-split=per_kernel" )
516
+ if (WIN32 )
517
+ list (APPEND MKL_OFFLOAD_LOPT "-fsycl-device-code-split:per_kernel" )
518
+ else ()
519
+ list (APPEND MKL_OFFLOAD_LOPT "-fsycl-device-code-split=per_kernel" )
520
+ endif ()
518
521
endif ()
519
522
endif ()
520
523
@@ -998,7 +1001,6 @@ if(SYCL_COMPILER)
998
1001
if (NOT TARGET MKL::MKL_SYCL )
999
1002
add_library (MKL::MKL_SYCL INTERFACE IMPORTED GLOBAL )
1000
1003
add_library (MKL::MKL_DPCPP ALIAS MKL::MKL_SYCL )
1001
- add_dependencies (MKL::MKL_SYCL MKL_SYCL_MESSAGE )
1002
1004
endif ()
1003
1005
target_compile_options (MKL::MKL_SYCL INTERFACE $< $< COMPILE_LANGUAGE:CXX> :${MKL_SYCL_COPT} > )
1004
1006
target_link_libraries (MKL::MKL_SYCL INTERFACE ${MKL_SYCL_LINK_LINE} ${MKL_SYCL_THREAD_LIB} ${MKL_SYCL_SUPP_LINK} )
@@ -1011,7 +1013,6 @@ if(SYCL_COMPILER)
1011
1013
endif ()
1012
1014
string (TOUPPER ${MKL_SYCL_DOMAIN} MKL_SYCL_DOMAIN )
1013
1015
add_library (MKL::MKL_SYCL::${MKL_SYCL_DOMAIN} INTERFACE IMPORTED GLOBAL )
1014
- add_dependencies (MKL::MKL_SYCL::${MKL_SYCL_DOMAIN} MKL_SYCL_MESSAGE )
1015
1016
target_compile_options (MKL::MKL_SYCL::${MKL_SYCL_DOMAIN} INTERFACE $< $< COMPILE_LANGUAGE:CXX> :${MKL_SYCL_COPT} > )
1016
1017
# Only dynamic link has domain specific libraries
1017
1018
# Domain specific targets still use mkl_sycl for static
0 commit comments