Skip to content

Commit

Permalink
Compile with MKL in conda-build
Browse files Browse the repository at this point in the history
Summary:
Problem:
Without -DBLAS=MKL, conda-build won't include MKL library into Caffe2 build. And the BLAS performance is bad on CPU.

Solution:
Explicitly add the flag. Add mkl and mkl-include as dependencies.

ezyang Yangqing
Closes facebookarchive/caffe2#1264

Reviewed By: bddppq

Differential Revision: D5919192

Pulled By: houseroad

fbshipit-source-id: bb51e4fc4015212694404180a610e06ec8ddb424
  • Loading branch information
houseroad authored and facebook-github-bot committed Sep 28, 2017
1 parent b9009df commit 96b1754
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion conda/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ PYTHON_ARGS="$(python ./scripts/get_python_cmake_flags.py)"

mkdir -p build
cd build
cmake -DCMAKE_INSTALL_PREFIX="$PREFIX" -DCMAKE_PREFIX_PATH="$PREFIX" $CONDA_CMAKE_ARGS $PYTHON_ARGS ..
cmake -DBLAS=MKL -DMKL_INCLUDE_DIR=$CONDA_PREFIX/include -DCMAKE_INSTALL_PREFIX="$PREFIX" -DCMAKE_PREFIX_PATH="$PREFIX" $CONDA_CMAKE_ARGS $PYTHON_ARGS ..
make -j20

make install/fast
Expand Down
3 changes: 3 additions & 0 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ requirements:
- leveldb
- lmdb
- snappy
- mkl-include
- mkl
run:
- future
- glog
Expand All @@ -38,6 +40,7 @@ requirements:
- lmdb
- snappy
- future
- mkl

about:
home: https://caffe2.ai/
Expand Down

0 comments on commit 96b1754

Please sign in to comment.