[caffe2]seperate mkl, mklml, and mkldnn#12170
[caffe2]seperate mkl, mklml, and mkldnn#12170gujinghui wants to merge 3 commits intopytorch:masterfrom
Conversation
gujinghui
commented
Sep 28, 2018
- Remove avx2 support in mkldnn
- Seperate mkl, mklml, and mkldnn
- Fix convfusion test case
865a907 to
03807a4
Compare
|
@pytorchbot retest this please |
yinghai
left a comment
There was a problem hiding this comment.
What's the test plan for this change?
And looks like we still have FIndMKLDNN.cmake. Can we merge that into one?
|
@yinghai For FindMKLDNN.cmake, yes, I have plan to move all to FindMKLDNN.cmake. |
Sorry what I meant is what's your command to build pytorch? |
facebook-github-bot
left a comment
There was a problem hiding this comment.
yinghai has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
@yinghai |
|
@orionr I think we cannot build with |
|
@yinghai after this PR, I'll submit new PR to enable setup.py for mkl-dnn ASAP. Is it OK to you? |
|
@yinghai |
|
@yinghai and @gujinghui sorry for the slow response here. libtorch builds (for C++ and no Python) are built exclusively with CMake, but PyTorch and Caffe2 builds will always go through cc @anderspapitto. |
|
Also, @gujinghui, to test, run |
03807a4 to
5c85a19
Compare
|
@orionr |
5c85a19 to
625be2c
Compare
orionr
left a comment
There was a problem hiding this comment.
Great work - thank you! I think we need to cleanup some of the naming and, most importantly, remove the CAFFE2_* variables from cmake/Modules/. Those should also likely be upstreamed as well. Happy to talk more on the PR, though.
caffe2/core/macros.h.in
Outdated
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
cmake/Modules/FindMKL.cmake
Outdated
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
cmake/Modules/FindMKL.cmake
Outdated
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
cmake/Modules/FindMKLDNN.cmake
Outdated
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
cmake/Summary.cmake
Outdated
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
625be2c to
82ac65c
Compare
|
@orionr And USE_MKLDNN/USE_MKL is defined by user to try to enable MKLDNN/MKL. How about use below macros in both cmake and C code, instead? Then, in caffe2/core/macros.h.in, we have below lines. And in C code, the code looks like below. |
facebook-github-bot
left a comment
There was a problem hiding this comment.
yinghai has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
If this is the case, I feel we should just use |
|
Thanks for the ping. I think there are still CAFFE2_* variables being set in cmake/Modules/Find*.cmake files? If so, that needs to be fixed before this can land. If these are only going to be used for PyTorch / Caffe2 (and not for other projects) in the future (I don't know the answer to that) we could move them to a new location, but hopefully we can make them standardized. |
82ac65c to
b4a30e8
Compare
orionr
left a comment
There was a problem hiding this comment.
Looks great! Thank you. One question on Windows and will now look at the CI results.
cmake/Modules/FindMKLDNN.cmake
Outdated
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
|
Looks like we have some CI failures with this - let's make sure those pass before importing, since this is a pretty significant change. Closing and reopening to see if we can get them restarted. |
|
@pytorchbot retest this please |
|
@orionr
|
|
GLU health should be fixed on master. |
|
@gujinghui can you please rebase and force push to this branch so we can confirm all the tests pass? Thanks. |
Signed-off-by: Gu, Jinghui <jinghui.gu@intel.com>
Mapping between cmake var and c macro: USE_MKL --> CAFFE2_USE_MKL USE_IDEEP --> CAFFE2_USE_IDEEP Signed-off-by: Gu, Jinghui <jinghui.gu@intel.com>
Signed-off-by: Gu, Jinghui <jinghui.gu@intel.com>
b4a30e8 to
45f15fd
Compare
|
@orionr |
|
Thank you! Failing test is only a timeout, so CI looks good. Starting to land. |
facebook-github-bot
left a comment
There was a problem hiding this comment.
orionr has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: 1. Remove avx2 support in mkldnn 2. Seperate mkl, mklml, and mkldnn 3. Fix convfusion test case Pull Request resolved: pytorch/pytorch#12170 Reviewed By: yinghai Differential Revision: D10207126 Pulled By: orionr fbshipit-source-id: 1e62eb47943f426a89d57e2d2606439f2b04fd51