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

could not use blas when building with cmake #15266

Open
hubutui opened this issue Jun 18, 2019 · 12 comments
Open

could not use blas when building with cmake #15266

hubutui opened this issue Jun 18, 2019 · 12 comments

Comments

@hubutui
Copy link

hubutui commented Jun 18, 2019

according to https://github.com/apache/incubator-mxnet/blob/master/make/config.mk#L117, USE_BLAS could be blas. However, https://github.com/apache/incubator-mxnet/blob/master/cmake/ChooseBlas.cmake seems don't deal with blas.

@mxnet-label-bot
Copy link
Contributor

Hey, this is the MXNet Label Bot.
Thank you for submitting the issue! I will try and suggest some labels so that the appropriate MXNet community members can help resolve it.
Here are my recommended labels: Build

@hubutui
Copy link
Author

hubutui commented Jun 18, 2019

Kindly remind, cmake provides FindBLAS module for finding variety blas package, see https://cmake.org/cmake/help/v3.15/module/FindBLAS.html

@leleamol
Copy link
Contributor

@mxnet-label-bot add [Build, Blas]

@larroy
Copy link
Contributor

larroy commented Jun 19, 2019

#14871

@larroy
Copy link
Contributor

larroy commented Jun 19, 2019

@edisongustavo

@hubutui
Copy link
Author

hubutui commented Jun 19, 2019

emm, using the FindBLAS module would be a great idea. And blas (blas, cblas, openblas, or atlas) is provided in Linux distribution, which doesn't need to be compiled from source again.

@larroy
Copy link
Contributor

larroy commented Jun 19, 2019

@hubutui could you help review the above PR with these suggestions? Thanks.

@hubutui
Copy link
Author

hubutui commented Jun 20, 2019

@larroy Thanks bro. I read the pr days ago. I would like to help, but I have little experience with cmake. There several thoughts comes to my mind:

  1. for mkl, mklml, and mkldnn, use the current solution, since cmake could not deal with it using FindBLAS.
  2. for other blas (atlas, openblas, etc), use the FindBLAS module from cmake.

@hubutui
Copy link
Author

hubutui commented Jun 20, 2019

actually, I'm a little confused about the math library selection. It seems that we could choose one of:

@TaoLv
Copy link
Member

TaoLv commented Jun 20, 2019

@hubutui I think you mean the BLAS library selection. MKL-DNN is a performance library for deep learning computations rather than a BLAS library, although it provides some GEMM implementations. So MKL-DNN doesn't participate the BLAS library selection.

Am I right that USE_BLAS is independent with USE_MKLDNN? And there is no USE_BLAS=mkldnn?

Yes, you're right.

@hubutui
Copy link
Author

hubutui commented Jun 20, 2019

@TaoLv Then https://mxnet.incubator.apache.org/versions/master/install/build_from_source.html#math-library-selection lists mkl full, mklml and mkl-dnn in the same level, which really make users confused.
So we could choose:

  • Apple Accelerate
  • ATLAS
  • MKL (MKL, MKLML)
  • OpenBLAS
    as the BLAS library selection. And we could enable MKL-DNN submodule to further speed up CPU computing?

@hubutui
Copy link
Author

hubutui commented Jun 25, 2019

emm, finally, I build mxnet with openblas & mkldnn, it works great for me.

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

6 participants