Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cmake : could not find mkl (missing MKLDNN_LIBRARY) #13881

Open
likangGit opened this issue Jan 15, 2019 · 10 comments

Comments

Projects
None yet
7 participants
@likangGit
Copy link

commented Jan 15, 2019

Description

When compliting mxnet with cmake (BLAS=MKL), cmake tells me that "could not find mkl (missing MKLDNN_LIBRARY)". This is because MKLDNN_LIBRARY=MKLDNN_LIBRARY-NOTFOUND. I know i should specify the library manually, But the mkldnn library has not been complied yet. so what should i do?

Environment info (Required)

ubuntu16.04
mxnet 1.3.0

What have you tried to solve it?

To solve this problem, i config BLAS=Atlas first. Then use command "make mkldnn" generates the mkldnn library. Now we can let BLAS=MKL, and specify the MKLDNN_LIBRARY=<path of mkldnn> manually. But,But,But this is not a right way to solve this problem, right?

@pengzhao-intel

This comment has been minimized.

Copy link
Contributor

commented Jan 15, 2019

@lebeg related your cmake PR #13576

@piyushghai

This comment has been minimized.

Copy link
Contributor

commented Jan 15, 2019

Thank you for submitting the issue! I'm labeling it so the MXNet community members can help resolve it. @mxnet-label-bot add [Build, CMake].

@azai91 Can you possibly have a look at this for MKLDNN ?

@piyushghai

This comment has been minimized.

Copy link
Contributor

commented Jan 15, 2019

@mxnet-label-bot update [MKL, MKLDNN]

@marcoabreu marcoabreu added MKL MKLDNN and removed Build CMake labels Jan 15, 2019

@dbsxdbsx

This comment has been minimized.

Copy link

commented Mar 4, 2019

I got the same problem

@pengzhao-intel

This comment has been minimized.

Copy link
Contributor

commented Mar 14, 2019

@troore

This comment has been minimized.

Copy link

commented May 9, 2019

Seems still have this problem with the following command:
-> % cmake -GNinja -DUSE_CUDA=OFF -DBLAS=mkl -DUSE_MKLDNN=1 ../

@pengzhao-intel

This comment has been minimized.

Copy link
Contributor

commented May 9, 2019

could you try the change of this PR #14877?

@pengzhao-intel

This comment has been minimized.

Copy link
Contributor

commented May 9, 2019

@yinghu5 please help take a look :)

@yinghu5

This comment has been minimized.

Copy link
Contributor

commented May 9, 2019

@likangGit @troore the cmake build have issues. we try to fix them by #14877. I attach several files. you may try to copy them to corresponding folders and see if it can workaround.

Mxnet_417.zip

% cmake -GNinja -DUSE_CUDA=OFF -DBLAS=mkl -DUSE_MKLDNN=1 ../-DUSE_BLAS=mkl -DUSE_MKLDNN=1 (mxnet master 4/17 or latest master)

@troore

This comment has been minimized.

Copy link

commented May 9, 2019

@pengzhao-intel @yinghu5 Thanks for your quick response!
And I just tried your solution @yinghu5, the cmake works well. But after that, the ninja has errors related to mkl-dnn. I just post one of them:
../include/mxnet././ndarray.h:710:51: error: expected ')' before 'mem_pd'
explicit NDArray(mkldnn::memory::primitive_desc mem_pd)
../include/mxnet/././ndarray.h:739:13: error: ‘primitive_desc’ in ‘struct mkldnn::memory’ does not name a type
const mkldnn::memory::primitive_desc &desc) const;

But still thank you guys. I will just wait for your final solution after merging into master. And now I will just use OpenBLAS instead.

BTW, I just posted on MXNet forum to list the issues during my building:
[MXNet Build] CMake with MKL/OpenBLAS Issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.