Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

why MKL and MKL-DNN can't be used simultaneously in ChooseBlas.cmake #12134

Closed
luchangli03 opened this issue Aug 11, 2018 · 7 comments
Closed
Labels
Build CMake CMake related bugs/issues/improvements MKLDNN

Comments

@luchangli03
Copy link

if(MKL_FOUND)
if(USE_MKLDNN)
set(BLAS "open")
else()
set(BLAS "MKL")
endif()
endif()

@luchangli03
Copy link
Author

in the 3rdparty/mshadow/cmake/mshadow.cmake
the codes are also
if(MKL_FOUND)
if(USE_MKLML_MKL)
set(BLAS "open")
else()
set(BLAS "MKL")
endif()
endif()
I can't understand

@marcoabreu
Copy link
Contributor

@lebeg

@pengzhao-intel
Copy link
Contributor

pengzhao-intel commented Aug 11, 2018

yes, it's a little trick and this is a piece of legacy code which we want to refine for a while.

You can refer to this discussion and @jinhuang415 can help with the details.
#10175

@jinhuang415
Copy link
Contributor

@luchangli03 Currently cmake BLAS is hard coded based on MKL_FOUND and USE_MKLDNN, we think this is unreasonable and need to change, solutions like to provide an option to select the BLAS type (just like what Makefile does, and users can still use MKL blas even use MKLDNN), this suggestion is also listed in #10175 related slides as well.

@lanking520
Copy link
Member

@mxnet-label-bot could you please label this as [build, cmake, mkldnn]

@marcoabreu marcoabreu added Build CMake CMake related bugs/issues/improvements MKLDNN labels Aug 13, 2018
@lebeg
Copy link
Contributor

lebeg commented Nov 19, 2018

I have fixed this issue with #11148 but the PR still has some problems.

@pengzhao-intel
Copy link
Contributor

The latest CMake refactors the logic of MKL selection.
The problem is resolved so closing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Build CMake CMake related bugs/issues/improvements MKLDNN
Projects
None yet
Development

No branches or pull requests

6 participants