Fix build issues and test failures in MKLDNN, and refine cmake files#11853
Fix build issues and test failures in MKLDNN, and refine cmake files#11853gujinghui wants to merge 16 commits intopytorch:masterfrom
Conversation
0b39266 to
a0a7b54
Compare
226c1a5 to
62f400d
Compare
62f400d to
f0bb08d
Compare
soumith
left a comment
There was a problem hiding this comment.
@gujinghui if we want to build MKLDNN functionality, but without ideep, it's no longer possible after this PR. We need to make sure that MKLDNN-only build (i.e. without ideep) is not removed / regressed
|
hi @soumith ideep and mkldnn are exactly same thing. ideep just is the integration bridge of mkldnn for caffe2. Thanks, |
f0bb08d to
647bcd0
Compare
tools/build_pytorch_libs.sh
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.
|
thanks. this is helpful context. I didn't have the context before-hand, so was confused as to what it was doing. I requested that you revert some tab / whitespace changes in build_pytorch_libs.sh / bat. After that this PR is good to go from my side. |
1783ba0 to
baf5067
Compare
And gracefully include omp.h Signed-off-by: Gu, Jinghui <jinghui.gu@intel.com>
Signed-off-by: Gu, Jinghui <jinghui.gu@intel.com>
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 USE_MKLML --> CAFFE2_USE_MKLML Signed-off-by: Gu, Jinghui <jinghui.gu@intel.com>
Signed-off-by: Gu, Jinghui <jinghui.gu@intel.com>
Signed-off-by: Gu, Jinghui <jinghui.gu@intel.com>
Signed-off-by: Gu, Jinghui <jinghui.gu@intel.com>
Signed-off-by: Gu, Jinghui <jinghui.gu@intel.com>
baf5067 to
ce3d8a6
Compare
Signed-off-by: Gu, Jinghui <jinghui.gu@intel.com>
|
I think this PR will solve my problem. I am spending days to force caffe2 to use mkldnn and ideep. I doubt whether current version is really using mkldnn at all since I cannot find where mkldnn primitives are called. |
|
@jiecaoyu PyTorch repo is changing very rapidly these days. We are trying hard to get MKL-DNN build back live these days... |
|
@jgong5 Thanks so much! |
Signed-off-by: Gu, Jinghui <jinghui.gu@intel.com>
Signed-off-by: Gu, Jinghui <jinghui.gu@intel.com>
Signed-off-by: Gu, Jinghui <jinghui.gu@intel.com>
25be4d3 to
f9160e2
Compare
|
|
||
| add_library(Caffe2_ideep_operators OBJECT ${avx2_srcs}) | ||
| add_dependencies(Caffe2_ideep_operators Caffe2_PROTO) | ||
| set_target_properties(Caffe2_ideep_operators PROPERTIES COMPILE_FLAGS "-mavx2") |
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.
caffe2/ideep/utils/ideep_context.h
Outdated
|
|
||
| BaseStaticContext* GetIDEEPStaticContext(); | ||
| #ifdef _WIN32 | ||
| #define CAFFE2_IDEEP_EXPORT __declspec(dllexport) |
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.
Signed-off-by: Gu, Jinghui <jinghui.gu@intel.com>
Signed-off-by: Gu, Jinghui <jinghui.gu@intel.com>
Signed-off-by: Gu, Jinghui <jinghui.gu@intel.com>
Signed-off-by: Gu, Jinghui <jinghui.gu@intel.com>
47403eb to
2c056b6
Compare
yinghai
left a comment
There was a problem hiding this comment.
Some of the build errors look weird. Have you trying rebasing to master?
yinghai
left a comment
There was a problem hiding this comment.
This diff still tries to do too many things and now it's painful to debug the build errors. Let's further localize the changes. Let's make a PR to do just one job:
- Fix undefined symbol issue in iDEEP after caffe2
rebase
And see how things go. It's OK that initially we have build errors.
| ELSE (BLAS_USE_CBLAS_DOT) | ||
| SET(BLAS_USE_CBLAS_DOT FALSE) | ||
| ENDIF (BLAS_USE_CBLAS_DOT) | ||
| SET(CMAKE_REQUIRED_LIBRARIES) |
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.
|
@gujinghui what's the status of this? Are there other PRs to follow up the other changes that were included here? |
|
@pjh5 BTW, we are working on #12170 now. After this got merged, you can run below test cmd to build with MKLDNN.
|
|
Closing this as #12170 is closed. |
Uh oh!
There was an error while loading. Please reload this page.