File tree Expand file tree Collapse file tree 4 files changed +12
-4
lines changed Expand file tree Collapse file tree 4 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -121,12 +121,20 @@ if(_use_onemkl_interfaces)
121121 else ()
122122 FetchContent_Declare(
123123 onemkl_interfaces_library
124- GIT_REPOSITORY https://github.com/oneapi-src/oneMKL .git
124+ GIT_REPOSITORY https://github.com/uxlfoundation/oneMath .git
125125 GIT_TAG 8f4312ef966420b9b8b4b82b9d5c22e2c91a1fe7 # v0.6
126126 )
127127 endif ()
128128
129129 FetchContent_MakeAvailable(onemkl_interfaces_library)
130+ if (TARGET onemath)
131+ set (MKL_INTERFACES_LIB "onemath" CACHE INTERNAL "OneMath lib target" )
132+ elseif (TARGET onemkl)
133+ set (MKL_INTERFACES_LIB "onemkl" CACHE INTERNAL "OneMKL lib target" )
134+ else ()
135+ message (FATAL_ERROR "Neither 'oneMath' nor 'oneMKL' found!" )
136+ endif ()
137+ message (STATUS "MKL interfaces lib target used: ${MKL_INTERFACES_LIB} " )
130138 set (CMAKE_INSTALL_RPATH "${CMAKE_BINARY_DIR} /lib" )
131139endif ()
132140
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ if (DPNP_GENERATE_COVERAGE)
8484endif ()
8585
8686if (_use_onemkl_interfaces)
87- target_link_libraries (${python_module_name} PUBLIC onemkl )
87+ target_link_libraries (${python_module_name} PRIVATE ${MKL_INTERFACES_LIB} )
8888 target_compile_options (${python_module_name} PRIVATE -DUSE_ONEMKL_INTERFACES)
8989 if (_use_onemkl_interfaces_cuda)
9090 target_compile_options (${python_module_name} PRIVATE -DUSE_ONEMKL_CUBLAS)
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ if (DPNP_GENERATE_COVERAGE)
8383endif ()
8484
8585if (_use_onemkl_interfaces)
86- target_link_libraries (${python_module_name} PUBLIC onemkl )
86+ target_link_libraries (${python_module_name} PRIVATE ${MKL_INTERFACES_LIB} )
8787 target_compile_options (${python_module_name} PRIVATE -DUSE_ONEMKL_INTERFACES)
8888else ()
8989 target_link_libraries (${python_module_name} PUBLIC MKL::MKL_SYCL::DFT)
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ if (DPNP_GENERATE_COVERAGE)
101101endif ()
102102
103103if (_use_onemkl_interfaces)
104- target_link_libraries (${python_module_name} PUBLIC onemkl )
104+ target_link_libraries (${python_module_name} PRIVATE ${MKL_INTERFACES_LIB} )
105105 target_compile_options (${python_module_name} PRIVATE -DUSE_ONEMKL_INTERFACES)
106106else ()
107107 target_link_libraries (${python_module_name} PUBLIC MKL::MKL_SYCL::LAPACK)
You can’t perform that action at this time.
0 commit comments