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

MXNET can't build from source on MKLDNN enabled #13524

Closed
juliusshufan opened this issue Dec 4, 2018 · 7 comments
Closed

MXNET can't build from source on MKLDNN enabled #13524

juliusshufan opened this issue Dec 4, 2018 · 7 comments

Comments

@juliusshufan
Copy link
Contributor

juliusshufan commented Dec 4, 2018

Description

On building MXNET from soure with the command:
make -j USE_MKLDNN=1 USE_OPENCV=1 USE_BLAS=mkl

The compiling always failed with error as below:

In file included from src/operator/nn/mkldnn/mkldnn_base.cc(23):
src/operator/nn/mkldnn/./mkldnn_base-inl.h(57): catastrophic error: cannot open source file "mkldnn.hpp"
#include "mkldnn.hpp"
^
In file included from src/operator/quantization/mkldnn/mkldnn_quantized_conv.cc(27):
src/operator/quantization/mkldnn/../../nn/mkldnn/mkldnn_base-inl.h(57): catastrophic error: cannot open source file "mkldnn.hpp"
#include "mkldnn.hpp"

Seems this is introduced by commit 65edc95 (@azai91), as the compilation is okay on commit 8949989 with same build command.

Environment info (Required)

CentOS 7.5
GCC 4.8.5

What to do:
1. Download the diagnosis script from https://raw.githubusercontent.com/apache/incubator-mxnet/master/tools/diagnose.py
2. Run the script using `python diagnose.py` and paste its output here.

Package used (Python/R/Scala/Julia):
(I'm using ...)

For Scala user, please provide:

  1. Java version: (java -version)
  2. Maven version: (mvn -version)
  3. Scala runtime if applicable: (scala -version)

For R user, please provide R sessionInfo():

Build info (Required if built from source)

Compiler (gcc/clang/mingw/visual studio): gcc 4.8.5

MXNet commit hash:
f2dcd7c
(Paste the output of git rev-parse HEAD here.)

Build config:
make -j USE_MKLDNN=1 USE_OPENCV=1 USE_BLAS=mkl

Error Message:

In file included from src/operator/nn/mkldnn/mkldnn_base.cc(23):
src/operator/nn/mkldnn/./mkldnn_base-inl.h(57): catastrophic error: cannot open source file "mkldnn.hpp"
#include "mkldnn.hpp"
^
In file included from src/operator/quantization/mkldnn/mkldnn_quantized_conv.cc(27):
src/operator/quantization/mkldnn/../../nn/mkldnn/mkldnn_base-inl.h(57): catastrophic error: cannot open source file "mkldnn.hpp"
#include "mkldnn.hpp"

Minimum reproducible example

(If you are using your own code, please provide a short script that reproduces the error. Otherwise, please provide link to the existing example.)

Steps to reproduce

(Paste the commands you ran that produced the error.)

  1. Clone the code
  2. make -j USE_MKLDNN=1 USE_OPENCV=1 USE_BLAS=mkl

@TaoLv @pengzhao-intel

@azai91
Copy link
Contributor

azai91 commented Dec 4, 2018

looking into

@azai91
Copy link
Contributor

azai91 commented Dec 4, 2018

I believe the issue is with mkl. system builds fine with openblas.

make -j USE_MKLDNN=1 USE_OPENCV=1 USE_BLAS=openblas

our CI does not test mkl blas.

@azai91
Copy link
Contributor

azai91 commented Dec 4, 2018

looking into fixing.

@Vikas-kum
Copy link
Contributor

@azai91 Can we revert this first and then work on the fix ?

@azai91
Copy link
Contributor

azai91 commented Dec 4, 2018

@juliusshufan can you build this with cmake?

cmake -DUSE_MKLDNN=1 -DBLAS=MKL -GNinja -DUSE_CUDA=OFF -DUSE_CUDNN=OFF .. && ninja

@azai91
Copy link
Contributor

azai91 commented Dec 4, 2018

Reverting. #13540

@juliusshufan
Copy link
Contributor Author

@azai91 Thanks for prompt fix, the compilation is okay now. I close the issue accordingly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants