kaldi icon indicating copy to clipboard operation
kaldi copied to clipboard

oneAPI mkl path on windows differs; upgrade Linux to oneMKL

Open rubu opened this issue 3 years ago • 8 comments

Seems that the new oneAPI Intel installer places things in different paths than expected by FindBLAS.cmake - after setting everything up (Intel oneAPI 2021.2) I could not make the cmake process work on Windows and the only way to overcome that was to patch FindBLAS.cmake and add lib/${BLAS_mkl_ARCH_NAME} to the BLAS_mkl_LIB_PATH_SUFFIXES variable. Seems that the oneAPI package has changed the structure of things since none of the existing suffixes work, but since I don't have any older MKL installations I can't verify that this breaks anything with the old ones, so just letting you know.

Not sure if this helps much, but this is how the library layout looks like for me after the installation: image

rubu avatar May 04 '21 13:05 rubu

Not only on Windows. oneMKL is a different API, C++ and open source, but includes "classic" closed source MKL in a subdirectory. It's the same MKL, and is being developed and supported (and is the only option for Fortran, so it's not replaced by the new libs), but packaging has changed, and now bundles both libs together.

Unfortunately, our CMake harness barely works, so I cannot provide an ETA for a fix.

We need to support it in the configure script, tho.

kkm000 avatar May 04 '21 14:05 kkm000

https://github.com/kaldi-asr/kaldi/pull/4483/files#diff-c956673c6bff360b17cb89a74d59fc5c17b5c2bc915edc5305f56feb788fae0d

On Tue, May 4, 2021 at 10:45 AM kkm000 @.***> wrote:

Not only on Windows. oneMKL is a different API, C++ and open source, but includes "classic" closed source MKL in a subdirectory. It's the same MKL, and is being developed and supported (and is the only option for Fortran, so it's not replaced by the new libs), but packaging has changed, and now bundles both libs together.

Unfortunately, our CMake harness barely works, so I cannot provide an ETA for a fix.

We need to support it in the configure script, tho.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/issues/4516#issuecomment-831997891, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACUKYXYPQI2O6HI3LG5IQV3TMAB77ANCNFSM44CWQA2A .

jtrmal avatar May 04 '21 14:05 jtrmal

@kkm000 sure, I don't need an ETA since I did the patch locally and built kaldi, so I'm kinda good. Just wanted to let you know.

rubu avatar May 04 '21 16:05 rubu

@jtrmal, nearly missed your patch, thanks for the x-ref. Will incorporate it, too!

Intel libs install into some system directory. VS integration looks for them in the registry. I never used CMake on Windows, don't even know if it has a built-in registry support. But can do through an external program (reg.exe comes with Windows), if it does not. I think it's the best to just take Intel's own logic for looking up all necessary lib/include paths, in the end.

kkm000 avatar May 19 '21 05:05 kkm000

@jtrmal, FYI: oneMKL 2021.4 finally added cmake config:

kkm@buba:/opt/intel/oneapi/mkl/2021.4.0/lib/cmake$ ll -R
.:
total 4.0K
drwxr-xr-x 2 root root 4.0K 2021-09-30 10:44:49 mkl/

./mkl:
total 32K
-rw-r--r-- 1 root root  27K 2021-09-04 06:29:24 MKLConfig.cmake
-rw-r--r-- 1 root root 1.6K 2021-09-04 06:29:24 MKLConfigVersion.cmake

kkm000 avatar Oct 09 '21 05:10 kkm000

nice. Not sure if there is an actionable ATM? y.

On Sat, Oct 9, 2021 at 1:19 AM kkm000 @.***> wrote:

@jtrmal https://github.com/jtrmal, FYI: oneMKL 2021.4 finally added cmake config:

@.***:/opt/intel/oneapi/mkl/2021.4.0/lib/cmake$ ll -R .: total 4.0K drwxr-xr-x 2 root root 4.0K 2021-09-30 10:44:49 mkl/

./mkl: total 32K -rw-r--r-- 1 root root 27K 2021-09-04 06:29:24 MKLConfig.cmake -rw-r--r-- 1 root root 1.6K 2021-09-04 06:29:24 MKLConfigVersion.cmake

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/issues/4516#issuecomment-939229943, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACUKYX67KKORVU2Q6TD6QQTUF7GFJANCNFSM44CWQA2A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

jtrmal avatar Oct 11 '21 14:10 jtrmal

No, I just hope to switch to CMake eventually. This is certainly helpful

kkm000 avatar Oct 11 '21 17:10 kkm000

👍

On Mon, Oct 11, 2021 at 1:17 PM kkm000 @.***> wrote:

No, I just hope to switch to CMake eventually. This is certainly helpful

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/issues/4516#issuecomment-940210120, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACUKYX2MZ77SD5232TEZBQTUGMLZVANCNFSM44CWQA2A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

jtrmal avatar Oct 11 '21 17:10 jtrmal