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)
121
121
else ()
122
122
FetchContent_Declare(
123
123
onemkl_interfaces_library
124
- GIT_REPOSITORY https://github.com/oneapi-src/oneMKL .git
124
+ GIT_REPOSITORY https://github.com/uxlfoundation/oneMath .git
125
125
GIT_TAG 8f4312ef966420b9b8b4b82b9d5c22e2c91a1fe7 # v0.6
126
126
)
127
127
endif ()
128
128
129
129
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} " )
130
138
set (CMAKE_INSTALL_RPATH "${CMAKE_BINARY_DIR} /lib" )
131
139
endif ()
132
140
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ if (DPNP_GENERATE_COVERAGE)
84
84
endif ()
85
85
86
86
if (_use_onemkl_interfaces)
87
- target_link_libraries (${python_module_name} PUBLIC onemkl )
87
+ target_link_libraries (${python_module_name} PRIVATE ${MKL_INTERFACES_LIB} )
88
88
target_compile_options (${python_module_name} PRIVATE -DUSE_ONEMKL_INTERFACES)
89
89
if (_use_onemkl_interfaces_cuda)
90
90
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)
83
83
endif ()
84
84
85
85
if (_use_onemkl_interfaces)
86
- target_link_libraries (${python_module_name} PUBLIC onemkl )
86
+ target_link_libraries (${python_module_name} PRIVATE ${MKL_INTERFACES_LIB} )
87
87
target_compile_options (${python_module_name} PRIVATE -DUSE_ONEMKL_INTERFACES)
88
88
else ()
89
89
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)
101
101
endif ()
102
102
103
103
if (_use_onemkl_interfaces)
104
- target_link_libraries (${python_module_name} PUBLIC onemkl )
104
+ target_link_libraries (${python_module_name} PRIVATE ${MKL_INTERFACES_LIB} )
105
105
target_compile_options (${python_module_name} PRIVATE -DUSE_ONEMKL_INTERFACES)
106
106
else ()
107
107
target_link_libraries (${python_module_name} PUBLIC MKL::MKL_SYCL::LAPACK)
You can’t perform that action at this time.
0 commit comments