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

[GitHub] szha closed pull request #9330: Add clang jobs to the CI

szha closed pull request #9330: Add clang jobs to the CI
URL: https://github.com/apache/incubator-mxnet/pull/9330
 
 
   

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 8444651725..b7a8f60cb9 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 491370d9a7..e26736f44f 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 0000000000..5bcdee563e
--- /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


 

----------------------------------------------------------------
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