TaoLv commented on issue #14202: [Doc] Start the tutorials for MKL-DNN backend URL: https://github.com/apache/incubator-mxnet/pull/14202#issuecomment-471416202 > I was under the impression that MKL-DNN was on by default. I guess this must be in the build from source route then? Yes, MKL-DNN is on by default when build from source. For pypi package `mxnet`, it is explicitly turned off. > I ran into those subprocess issues. Should this be mentioned somewhere? Add a mention of KMP_INIT_AT_FORK=false - or maybe that needs to be thrown into the makefile to prevent problems? I thought it's an issue of iomp not mxnet and someone is already working on it. I will track the progress of it. If it does not seem to be fixed soon, I will add it somewhere in the document. > If you have already installed MKL and you pip install mxnet, what happens? If you have already installed MKL-DNN and you pip install mxnet, what happens? If you have already installed both MKL and MKL-DNN and you pip install mxnet, what happens? MXNet should run into openblas and native CPU implementation. MKL and MKL-DNN code is not compiled into `mxnet` pypi package - the code is wrapped with compiling flags `MSHADOW_USE_MKL` or `MXNET_USE_MKLDNN`. > If you have not installed either and you pip install mxnet-mkl, what happens? If you have not installed either and you pip install mxnet, what happens? `mxnet-mkl`/`mxnet` should work properly. It doesn't depend on any external installed package - MKL is statically linked and mkldnn.so is distributed with `mxnet-mkl` pypi package. > If you have already installed MKL and you build from source (with default flags), what happens? I reported this issue where it doesn't work (on Windows): #11769 You should explicitly use `USE_BLAS=mkl` to link MKL as BLAS library. `USE_MKLDNN=1` should not affect the option choice. You issue looks like a cmake issue of mshadow to me. > If you have already installed MKL-DNN and you build from source (with default flags), what happens? MXNet has its bundled MKL-DNN sub-module. The sub-module will be compiled and linked when `USE_MKLDNN=1`. External installed MKL-DNN package should not affect the process of build from source without some hack to the makefile or the link path. > What other variations pop up when we consider Apple or Linux or Edge? Should share the similar methodology. One exception is that currently MKL-DNN is enabled by default only when build from source on linux + x86.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
