Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Official CMake (3.0+) support for MKL

izmailov__sergei
Beginner
1,244 Views

Latest release of "Intel® Parallel Studio XE Cluster Edition for Linux* 2020" comes with no cmake support.

It makes hard to maintain applications which rely on MKL or has it as optional dependency.

CMake currently dominates the industry and missing it's support in one of most used math library is at least strange.

Is there any plans to add official CMake support?

I wish usage of MKL it would be as simple as

find_package(IntelMKL REQUIRED CONFIG)
target_link_library(my_lib PUBLIC IntelMKL::Base)

but currently it's much more involved.

Standard modules (FindLAPACK and FindBLAS) do not cover all usages of MKL.

3rd party implementations of FindMKL module (PyTorch and AmberMD) seems to be incomplete, with questionable compatibility and configurational freedom:

https://github.com/pytorch/pytorch/blob/master/cmake/Modules/FindMKL.cmake

https://gist.github.com/multiplemonomials/6ee074038778a21cd25b73659a6a82d9

 

0 Kudos
7 Replies
Gennady_F_Intel
Moderator
1,244 Views

We introduced pkg-config tool since the MKL v.2020. https://software.intel.com/en-us/articles/intel-math-kernel-library-intel-mkl-and-pkg-config-tool

Could it be useful for your case?

0 Kudos
izmailov__sergei
Beginner
1,243 Views

Thanks for quick reply!

It's clear improvement for makefile-based projects, but it's not so useful for cmake-based.

`pkg-config` might help to simplify/verify custom cmake scripts, but it's still far from being user-friendly.

A good example is boost library which used custom build system for a long time without cmake support. Kitware provided FindBoost module to simplify boost users life, but it was essentially a 3rd party module (shipped with cmake installation). Now boost does well and provides `BoostConfig.cmake` upon installation and now only two lines of code are required to link against particular part of boost library, e.g. Boost::random.

I would classify it as MKL usability issue. You can tell it from existence of many versions of 3rd party `FindMKL.cmake` modules.

0 Kudos
Gennady_F_Intel
Moderator
1,243 Views

Sergey, we don't  such plans at this moment, but I encourage you to submit the FR to the official support channel - Intel Online Service Center.

0 Kudos
izmailov__sergei
Beginner
1,243 Views

I was bounced back to forum, probably it is the answer.

Hi Sergei, we thank you for your interest and taking time in sharing a feedback. Unfortunately your free product does not come under Priority support. We suggest you to click here Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library and post your query and we believe our engineers would be able to help you out on your query.

 

Have a nice day!

0 Kudos
Gennady_F_Intel
Moderator
1,243 Views

Ok, I see. That's mean you don't have the commercial version of MKL. Is that correct?. In any case, I captured this request and will add to our internal database to follow further. I will keep the thread updated.

0 Kudos
izmailov__sergei
Beginner
1,243 Views

Correct, my own license is free one (provided by university), but I have access to clusters with commercial licensed Intel software.
Again, thank you for cooperation.

0 Kudos
izmailov__sergei
Beginner
1,243 Views

I've submitted feature request, thanks for your help!

0 Kudos
Reply