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

Compile with MKL in conda-build #1264

Closed
wants to merge 1 commit into from

Conversation

houseroad
Copy link
Contributor

@houseroad houseroad commented Sep 26, 2017

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

@facebook-github-bot
Copy link
Contributor

@houseroad has updated the pull request.

@ezyang
Copy link
Contributor

ezyang commented Sep 27, 2017

LGTM. (in chat, I mentioned that it was surprising that mkl-include was needed for the build, since PyTorch doesn't seem to need it. Shrug.)

@houseroad
Copy link
Contributor Author

Let me check this with Pytorch team.

@facebook-github-bot
Copy link
Contributor

@houseroad has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@Yangqing
Copy link
Contributor

Chatted offline and it's because PyTorch uses explicit BLAS interface only, while C2 MKL mode also uses MKLDNN and a bunch of others. In any case, thanks for the fix! :)

@facebook-github-bot
Copy link
Contributor

@Yangqing has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@uddmorningsun
Copy link

@ezyang Any ideas to support caffe2 GPU version conda-build recipe ? Thanks !

@ezyang
Copy link
Contributor

ezyang commented Nov 26, 2017

It's supported; at least, I have successfully used an edited version of the conda recipe to build caffe2 with GPU support.

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

Successfully merging this pull request may close these issues.

5 participants