You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by zh...@apache.org on 2019/06/16 23:52:42 UTC

[incubator-mxnet] branch master updated: Fix horovod build failure when mxnet is built from source (#15213)

This is an automated email from the ASF dual-hosted git repository.

zhasheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
     new 85aaa3a  Fix horovod build failure when mxnet is built from source (#15213)
85aaa3a is described below

commit 85aaa3a4881e5827c5c558b334ade885681d496a
Author: Lin Yuan <ap...@gmail.com>
AuthorDate: Sun Jun 16 16:52:09 2019 -0700

    Fix horovod build failure when mxnet is built from source (#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
---
 .gitignore                    | 5 ++++-
 Makefile                      | 2 +-
 include/mkldnn                | 1 -
 include/mkldnn/mkldnn.h       | 1 +
 include/mkldnn/mkldnn_types.h | 1 +
 mkldnn.mk                     | 3 ++-
 tools/license_header.py       | 3 +++
 7 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/.gitignore b/.gitignore
index 59ca0d4..94cc9ba 100644
--- a/.gitignore
+++ b/.gitignore
@@ -161,4 +161,7 @@ tests/mxnet_unit_tests
 coverage.xml
 
 # Local CMake build config
-cmake_options.yml
\ No newline at end of file
+cmake_options.yml
+
+# header file generated at compile time
+include/mkldnn/mkldnn_version.h
diff --git a/Makefile b/Makefile
index 6fc3c3a..741c5f0 100644
--- a/Makefile
+++ b/Makefile
@@ -594,7 +594,7 @@ lint: cpplint rcpplint jnilint pylint
 
 cpplint:
 	3rdparty/dmlc-core/scripts/lint.py mxnet cpp include src plugin cpp-package tests \
-	--exclude_path src/operator/contrib/ctc_include
+	--exclude_path src/operator/contrib/ctc_include include/mkldnn
 
 pylint:
 	python3 -m pylint --rcfile=$(ROOTDIR)/ci/other/pylintrc --ignore-patterns=".*\.so$$,.*\.dll$$,.*\.dylib$$" python/mxnet tools/caffe_converter/*.py
diff --git a/include/mkldnn b/include/mkldnn
deleted file mode 120000
index ed48bf6..0000000
--- a/include/mkldnn
+++ /dev/null
@@ -1 +0,0 @@
-../3rdparty/mkldnn/include
\ No newline at end of file
diff --git a/include/mkldnn/mkldnn.h b/include/mkldnn/mkldnn.h
new file mode 120000
index 0000000..873c515
--- /dev/null
+++ b/include/mkldnn/mkldnn.h
@@ -0,0 +1 @@
+../../3rdparty/mkldnn/include/mkldnn.h
\ No newline at end of file
diff --git a/include/mkldnn/mkldnn_types.h b/include/mkldnn/mkldnn_types.h
new file mode 120000
index 0000000..548b884
--- /dev/null
+++ b/include/mkldnn/mkldnn_types.h
@@ -0,0 +1 @@
+../../3rdparty/mkldnn/include/mkldnn_types.h
\ No newline at end of file
diff --git a/mkldnn.mk b/mkldnn.mk
index be45ce5..802f3dc 100644
--- a/mkldnn.mk
+++ b/mkldnn.mk
@@ -19,6 +19,7 @@ ifeq ($(USE_MKLDNN), 1)
 	MKLDNN_SUBMODDIR = $(ROOTDIR)/3rdparty/mkldnn
 	MKLDNN_BUILDDIR = $(MKLDNN_SUBMODDIR)/build
 	MXNET_LIBDIR = $(ROOTDIR)/lib
+	MXNET_INCLDIR = $(ROOTDIR)/include
 ifeq ($(UNAME_S), Darwin)
 	OMP_LIBFILE = $(MKLDNNROOT)/lib/libiomp5.dylib
 	MKLML_LIBFILE = $(MKLDNNROOT)/lib/libmklml.dylib
@@ -49,7 +50,7 @@ $(MKLDNN_LIBFILE):
 	cp $(OMP_LIBFILE) $(MXNET_LIBDIR)
 	cp $(MKLML_LIBFILE) $(MXNET_LIBDIR)
 	cp $(MKLDNN_LIBFILE) $(MXNET_LIBDIR)
-
+	cp $(MKLDNN_BUILDDIR)/include/mkldnn_version.h $(MXNET_INCLDIR)/mkldnn/.
 mkldnn_clean:
 	$(RM) -r 3rdparty/mkldnn/build
 	$(RM) -r $(MKLDNNROOT)
diff --git a/tools/license_header.py b/tools/license_header.py
index b9acbf1..c8add72 100755
--- a/tools/license_header.py
+++ b/tools/license_header.py
@@ -68,6 +68,9 @@ _WHITE_LIST = [
                # Git submodules under different licenses
                '3rdparty',
 
+               # 3rdparty headerfiles under different licenses
+               'include/mkldnn',
+
                # Code shared with project by author - see file for details
                'src/operator/special_functions-inl.h',