You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/03/26 11:05:48 UTC

[GitHub] marcoabreu closed pull request #10218: [MXNET-138]Create CentOS gcc4.8 & MKLDNN ci-test

marcoabreu closed pull request #10218: [MXNET-138]Create CentOS gcc4.8 & MKLDNN ci-test
URL: https://github.com/apache/incubator-mxnet/pull/10218
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/Jenkinsfile b/Jenkinsfile
index f9e038f0c3c..275b3e98b2a 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -141,6 +141,15 @@ try {
         }
       }
     },
+    'CPU: CentOS 7 MKLDNN': {
+      node('mxnetlinux-cpu') {
+        ws('workspace/build-centos7-mkldnn') {
+          init_git()
+          sh "ci/build.py --build --platform centos7_cpu /work/runtime_functions.sh build_centos7_mkldnn"
+          pack_lib('centos7_mkldnn')
+        }
+      }
+    },
     'GPU: CentOS 7': {
       node('mxnetlinux-cpu') {
         ws('workspace/build-centos7-gpu') {
diff --git a/ci/docker/Dockerfile.build.centos7_cpu b/ci/docker/Dockerfile.build.centos7_cpu
index 665f7ddd99a..a44d6464ee3 100755
--- a/ci/docker/Dockerfile.build.centos7_cpu
+++ b/ci/docker/Dockerfile.build.centos7_cpu
@@ -28,6 +28,8 @@ COPY install/centos7_core.sh /work/
 RUN /work/centos7_core.sh
 COPY install/centos7_python.sh /work/
 RUN /work/centos7_python.sh
+COPY install/ubuntu_mklml.sh /work/
+RUN /work/ubuntu_mklml.sh
 COPY install/centos7_adduser.sh /work/
 RUN /work/centos7_adduser.sh 
 
diff --git a/ci/docker/runtime_functions.sh b/ci/docker/runtime_functions.sh
index abb37022d66..e504613f7e4 100755
--- a/ci/docker/runtime_functions.sh
+++ b/ci/docker/runtime_functions.sh
@@ -184,6 +184,19 @@ build_centos7_cpu() {
         -j$(nproc)
 }
 
+build_centos7_mkldnn() {
+    set -ex
+    cd /work/mxnet
+    make \
+        DEV=1 \
+        USE_LAPACK=1 \
+        USE_LAPACK_PATH=/usr/lib64/liblapack.so \
+        USE_PROFILER=1 \
+        USE_MKLDNN=1 \
+        USE_BLAS=openblas \
+        -j$(nproc)
+}
+
 build_centos7_gpu() {
     set -ex
     cd /work/mxnet
diff --git a/tests/cpp/operator/mkldnn.cc b/tests/cpp/operator/mkldnn.cc
index a8a3d26fac3..c3e03df195e 100644
--- a/tests/cpp/operator/mkldnn.cc
+++ b/tests/cpp/operator/mkldnn.cc
@@ -28,6 +28,7 @@
 #include "gtest/gtest.h"
 #include "../../src/operator/nn/mkldnn/mkldnn_base-inl.h"
 
+#if __GNUC__ >= 5
 bool test_mem_align(void *mem, size_t size, size_t alignment, size_t space) {
   void *ret1, *ret2;
   size_t space1, space2;
@@ -39,12 +40,13 @@ bool test_mem_align(void *mem, size_t size, size_t alignment, size_t space) {
   EXPECT_EQ(space1, space2);
   return ret1 == ret2;
 }
+#endif
 
 TEST(MKLDNN_UTIL_FUNC, AlignMem) {
+#if __GNUC__ >= 5
   size_t alignment = 4096;
   void *mem;
   size_t size, space;
-
   // When mem has been aligned.
   mem = reinterpret_cast<void *>(0x10000);
   size = 1000;
@@ -69,5 +71,10 @@ TEST(MKLDNN_UTIL_FUNC, AlignMem) {
     space = random() % 2000;
     test_mem_align(mem, size, alignment, space);
   }
+#else
+  // std::align is not supported in GCC < 5.0, this test case will be checked
+  // with newer version
+  LOG(INFO) << "Skipped for GCC " << __GNUC__ << "." << __GNUC_MINOR__;
+#endif
 }
 #endif


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services