Skip to content

Commit 85aaa3a

Browse files
apeforestszha
authored andcommittedJun 16, 2019
Fix horovod build failure when mxnet is built from source (apache#15213)
* fix horovod build when mxnet is built from source * copy header file in mkldnn * copy mkldnn_version header file to include * remove unnecessary line * fix the untracked file * whitelist mkldnn headerfile * exlude lint path
1 parent c4ea674 commit 85aaa3a

File tree

7 files changed

+12
-4
lines changed

7 files changed

+12
-4
lines changed
 

‎.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -161,4 +161,7 @@ tests/mxnet_unit_tests
161161
coverage.xml
162162

163163
# Local CMake build config
164-
cmake_options.yml
164+
cmake_options.yml
165+
166+
# header file generated at compile time
167+
include/mkldnn/mkldnn_version.h

‎Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ lint: cpplint rcpplint jnilint pylint
594594

595595
cpplint:
596596
3rdparty/dmlc-core/scripts/lint.py mxnet cpp include src plugin cpp-package tests \
597-
--exclude_path src/operator/contrib/ctc_include
597+
--exclude_path src/operator/contrib/ctc_include include/mkldnn
598598

599599
pylint:
600600
python3 -m pylint --rcfile=$(ROOTDIR)/ci/other/pylintrc --ignore-patterns=".*\.so$$,.*\.dll$$,.*\.dylib$$" python/mxnet tools/caffe_converter/*.py

‎include/mkldnn

-1
This file was deleted.

‎include/mkldnn/mkldnn.h

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../3rdparty/mkldnn/include/mkldnn.h

‎include/mkldnn/mkldnn_types.h

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../3rdparty/mkldnn/include/mkldnn_types.h

‎mkldnn.mk

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ ifeq ($(USE_MKLDNN), 1)
1919
MKLDNN_SUBMODDIR = $(ROOTDIR)/3rdparty/mkldnn
2020
MKLDNN_BUILDDIR = $(MKLDNN_SUBMODDIR)/build
2121
MXNET_LIBDIR = $(ROOTDIR)/lib
22+
MXNET_INCLDIR = $(ROOTDIR)/include
2223
ifeq ($(UNAME_S), Darwin)
2324
OMP_LIBFILE = $(MKLDNNROOT)/lib/libiomp5.dylib
2425
MKLML_LIBFILE = $(MKLDNNROOT)/lib/libmklml.dylib
@@ -49,7 +50,7 @@ $(MKLDNN_LIBFILE):
4950
cp $(OMP_LIBFILE) $(MXNET_LIBDIR)
5051
cp $(MKLML_LIBFILE) $(MXNET_LIBDIR)
5152
cp $(MKLDNN_LIBFILE) $(MXNET_LIBDIR)
52-
53+
cp $(MKLDNN_BUILDDIR)/include/mkldnn_version.h $(MXNET_INCLDIR)/mkldnn/.
5354
mkldnn_clean:
5455
$(RM) -r 3rdparty/mkldnn/build
5556
$(RM) -r $(MKLDNNROOT)

‎tools/license_header.py

+3
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@
6868
# Git submodules under different licenses
6969
'3rdparty',
7070

71+
# 3rdparty headerfiles under different licenses
72+
'include/mkldnn',
73+
7174
# Code shared with project by author - see file for details
7275
'src/operator/special_functions-inl.h',
7376

0 commit comments

Comments
 (0)
Please sign in to comment.