Skip to content

Remove MKL_VERSION_2024 variable from cmake files #1889

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,11 @@ endif()
set(MKL_ARCH "intel64")
set(MKL_LINK "dynamic")
set(MKL_THREADING "tbb_thread")
set(MKL_VERSION_2024 FALSE)
set(MKL_INTERFACE "ilp64")
find_package(MKL QUIET)
if(MKL_FOUND)
if(MKL_VERSION VERSION_GREATER_EQUAL "2024.0.0")
set(MKL_VERSION_2024 TRUE)
set(MKL_INTERFACE "ilp64")
find_package(MKL REQUIRED)
endif()
endif()

if(NOT MKL_VERSION_2024)
set(MKL_INTERFACE_FULL "intel_ilp64")
find_package(MKL REQUIRED)
else()
find_package(MKL REQUIRED PATHS ${CMAKE_SOURCE_DIR}/dpnp/backend/cmake/Modules NO_DEFAULT_PATH)
endif()

Expand Down
7 changes: 1 addition & 6 deletions dpnp/backend/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,7 @@ if(DPNP_GENERATE_COVERAGE)
target_link_options(${_trgt} PRIVATE -fprofile-instr-generate -fcoverage-mapping)
endif()

if (MKL_VERSION_2024)
target_link_libraries(${_trgt} PUBLIC MKL::MKL_SYCL)
else()
target_link_libraries(${_trgt} PUBLIC MKL::MKL_DPCPP)
endif()

target_link_libraries(${_trgt} PUBLIC MKL::MKL_SYCL)
target_link_libraries(${_trgt} PUBLIC oneDPL)

if (UNIX)
Expand Down
6 changes: 1 addition & 5 deletions dpnp/backend/extensions/blas/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,7 @@ if (DPNP_GENERATE_COVERAGE)
target_link_options(${python_module_name} PRIVATE -fprofile-instr-generate -fcoverage-mapping)
endif()

if (MKL_VERSION_2024)
target_link_libraries(${python_module_name} PUBLIC MKL::MKL_SYCL::BLAS)
else()
target_link_libraries(${python_module_name} PUBLIC MKL::MKL_DPCPP)
endif()
target_link_libraries(${python_module_name} PUBLIC MKL::MKL_SYCL::BLAS)

install(TARGETS ${python_module_name}
DESTINATION "dpnp/backend/extensions/blas"
Expand Down
6 changes: 1 addition & 5 deletions dpnp/backend/extensions/lapack/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,7 @@ if (DPNP_GENERATE_COVERAGE)
target_link_options(${python_module_name} PRIVATE -fprofile-instr-generate -fcoverage-mapping)
endif()

if (MKL_VERSION_2024)
target_link_libraries(${python_module_name} PUBLIC MKL::MKL_SYCL::LAPACK)
else()
target_link_libraries(${python_module_name} PUBLIC MKL::MKL_DPCPP)
endif()
target_link_libraries(${python_module_name} PUBLIC MKL::MKL_SYCL::LAPACK)

install(TARGETS ${python_module_name}
DESTINATION "dpnp/backend/extensions/lapack"
Expand Down
6 changes: 1 addition & 5 deletions dpnp/backend/extensions/vm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,7 @@ if (DPNP_GENERATE_COVERAGE)
target_link_options(${python_module_name} PRIVATE -fprofile-instr-generate -fcoverage-mapping)
endif()

if (MKL_VERSION_2024)
target_link_libraries(${python_module_name} PUBLIC MKL::MKL_SYCL::VM)
else()
target_link_libraries(${python_module_name} PUBLIC MKL::MKL_DPCPP)
endif()
target_link_libraries(${python_module_name} PUBLIC MKL::MKL_SYCL::VM)

install(TARGETS ${python_module_name}
DESTINATION "dpnp/backend/extensions/vm"
Expand Down
Loading