You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/03/05 10:04:21 UTC

[GitHub] [incubator-mxnet] dbsxdbsx opened a new issue #14335: Question on installation and use of MKLDNN

dbsxdbsx opened a new issue #14335: Question on installation and use of MKLDNN
URL: https://github.com/apache/incubator-mxnet/issues/14335
 
 
   I am trying to build mxnet from source to use with python and C++ on win10_64, and with MKL+MKLDNN as backbone. 
   
   Question on installation:
   With the latest `CMakeList.txt` in mxnet source,I  see:
   ```
   mxnet_option(USE_MKL_IF_AVAILABLE "Use MKL if found" ON)
   mxnet_option(USE_MKLML_MKL        "Use MKLDNN variant of MKL (if MKL found)" ON IF USE_MKL_IF_AVAILABLE AND (NOT APPLE))
   mxnet_option(USE_MKLDNN           "Use MKLDNN variant of MKL (if MKL found)" ON IF USE_MKL_IF_AVAILABLE AND (NOT APPLE) AND (NOT MSVC) AND (CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") AND (NOT CMAKE_CROSSCOMPILING))
   ```
   Here, I know MKL  is the basic intel lib with can be installed alone. `MKLML_MKL` is a sub module of MKL. `MKLDNN` is lib optimized for deep learning especially,  it can be used alone or with MKL( FULL INSTALLTION or _MKLML_MKL) or even other blas lib. And from Intel offically, seems MKL(FUll Installation)+MKLDNN would give the best performance---that is what I want to try. And I've FULL installed MKL  manually.
   
   Q1: why the explanation of `USE_MKLML_MKL ` and `USE_MKLDNN ` are all the same, it is confusing. I did found an issue talking about this, but it is still confusing.
   
   Q2: from office tutorial of [gluonCV with C++](https://github.com/dmlc/gluon-cv/tree/master/scripts/deployment/cpp-inference), seems  it is feasible to build with MKL+MKLDNN in cmd command. But with CMake Gui,  USE_MKLDNN is forbidden, as it need `(NOT MSVC) `. WHY?
   
   Q3: To build MKLDNN with MKL(full installed but NOT submodule),  with mxnet official tutorial [here](https://github.com/apache/incubator-mxnet/blob/master/MKLDNN_README.md), I need to:
   `Copy file 3rdparty/mkldnn/config_template.vcxproj to incubator-mxnet root.`But I only found `config_template.vcxproj.user`, does that mean I could build mxnet with MKL+MKLDNN after I copy it to the root path of mxnet but with NO selection of `USE_MKLDNN ` when configuring with CMAKE Gui?
   
   About usage of MKL:
   I know mxnet is just released a new version 1.4, with some update of  MKL(+DNN). But after looking  into tutorial [MKLDNN_README](https://cwiki.apache.org/confluence/display/MXNET/MXNet+Graph+Optimization+and+Quantization+based+on+subgraph+and+MKL-DNN), With MKL+MKLDNN built with mxnet 1.4,I wonder
   Q1: does it  mean that MKL+MKLDNN is automatically  used in cpu mode with net graph BUT NOT include  `SUBGRAPH`  without setting an OS variable `MXNET_SUBGRAPH_BACKEND=MKLDNN`?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services