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 2018/01/11 16:33:40 UTC

[incubator-mxnet] branch master updated: Add clang jobs to the CI (#9330)

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 2b73aac  Add clang jobs to the CI (#9330)
2b73aac is described below

commit 2b73aac527a3439ec0dc9b1e76c6df09ea347eb1
Author: Kellen Sunderland <ke...@gmail.com>
AuthorDate: Thu Jan 11 17:33:34 2018 +0100

    Add clang jobs to the CI (#9330)
    
    * Fixed a clang warning
    
    * Add clang jobs to the CI
---
 Jenkinsfile                         | 36 ++++++++++++++++++++++++++++++++++++
 src/io/image_io.cc                  |  2 +-
 tests/ci_build/Dockerfile.cpu_clang | 21 +++++++++++++++++++++
 3 files changed, 58 insertions(+), 1 deletion(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 8444651..b7a8f60 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -168,6 +168,42 @@ try {
         }
       }
     },
+    'CPU: Clang 3.9': {
+      node('mxnetlinux-cpu') {
+        ws('workspace/build-cpu-clang') {
+          init_git()
+          def flag = """ \
+            USE_PROFILER=1                \
+            USE_CPP_PACKAGE=1             \
+            USE_BLAS=openblas             \
+            USE_OPENMP=0                  \
+            CXX=clang++-3.9               \
+            CC=clang-3.9                  \
+            -j\$(nproc)
+            """
+          make("cpu_clang", flag)
+          pack_lib('cpu_clang')
+        }
+      }
+    },
+    'CPU: Clang 5': {
+      node('mxnetlinux-cpu') {
+        ws('workspace/build-cpu-clang') {
+          init_git()
+          def flag = """ \
+            USE_PROFILER=1                \
+            USE_CPP_PACKAGE=1             \
+            USE_BLAS=openblas             \
+            USE_OPENMP=1                  \
+            CXX=clang++-5.0               \
+            CC=clang-5.0                  \
+            -j\$(nproc)
+            """
+          make("cpu_clang", flag)
+          pack_lib('cpu_clang')
+        }
+      }
+    },
     'CPU: MKLML': {
       node('mxnetlinux-cpu') {
         ws('workspace/build-mklml-cpu') {
diff --git a/src/io/image_io.cc b/src/io/image_io.cc
index 491370d..e26736f 100644
--- a/src/io/image_io.cc
+++ b/src/io/image_io.cc
@@ -240,7 +240,7 @@ void Imread(const nnvm::NodeAttrs& attrs,
   Engine::Get()->PushSync([ndout, buff, fsize, param](RunContext ctx){
       ImdecodeImpl(param.flag, param.to_rgb, buff, fsize,
                    const_cast<NDArray*>(&ndout));
-      delete buff;
+      delete[] buff;
     }, ndout.ctx(), {}, {ndout.var()},
     FnProperty::kNormal, 0, PROFILER_MESSAGE("Imread"));
 #else
diff --git a/tests/ci_build/Dockerfile.cpu_clang b/tests/ci_build/Dockerfile.cpu_clang
new file mode 100644
index 0000000..5bcdee5
--- /dev/null
+++ b/tests/ci_build/Dockerfile.cpu_clang
@@ -0,0 +1,21 @@
+FROM ubuntu:16.04
+
+COPY install/ubuntu_install_core.sh /install/
+RUN /install/ubuntu_install_core.sh
+COPY install/ubuntu_install_python.sh /install/
+RUN /install/ubuntu_install_python.sh
+COPY install/ubuntu_install_scala.sh /install/
+RUN /install/ubuntu_install_scala.sh
+COPY install/ubuntu_install_r.sh /install/
+RUN /install/ubuntu_install_r.sh
+COPY install/ubuntu_install_perl.sh /install/
+RUN /install/ubuntu_install_perl.sh
+
+# Install clang 3.9 (the same version as in XCode 8.*) and 5.0 (latest major release)
+RUN wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \
+    apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-3.9 main" && \
+    apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-5.0 main" && \
+    apt-get update && \
+    apt-get install -y clang-3.9 clang-5.0 && \
+    clang-3.9 --version && \
+    clang-5.0 --version

-- 
To stop receiving notification emails like this one, please contact
['"commits@mxnet.apache.org" <co...@mxnet.apache.org>'].