You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by ma...@apache.org on 2019/06/24 08:21:15 UTC

[incubator-mxnet] branch master updated: Fix build_ccache_wrappers: (#14631)

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

marcoabreu 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 7fe478a  Fix build_ccache_wrappers: (#14631)
7fe478a is described below

commit 7fe478afc4f8bed58b9816ddce57a3c75997c9f2
Author: Pedro Larroy <pe...@gmail.com>
AuthorDate: Mon Jun 24 01:20:33 2019 -0700

    Fix build_ccache_wrappers: (#14631)
    
    * Fix broken links
    * Make it idempotent
    fixes https://github.com/apache/incubator-mxnet/pull/13456
    fixes https://github.com/apache/incubator-mxnet/issues/14117
    fixes https://github.com/apache/incubator-mxnet/issues/11516
---
 ci/docker/runtime_functions.sh | 49 +++++++++++++++++-------------------------
 1 file changed, 20 insertions(+), 29 deletions(-)

diff --git a/ci/docker/runtime_functions.sh b/ci/docker/runtime_functions.sh
index 1ad6728..0fef2a0 100755
--- a/ci/docker/runtime_functions.sh
+++ b/ci/docker/runtime_functions.sh
@@ -86,37 +86,29 @@ build_ccache_wrappers() {
     # But in the beginning, we'll make this opt-in. In future, loads of processes like
     # the scala make step or numpy compilation and other pip package generations
     # could be heavily sped up by using ccache as well.
-    mkdir /tmp/ccache-redirects
+    mkdir -p /tmp/ccache-redirects
     export PATH=/tmp/ccache-redirects:$PATH
-    ln -s ccache /tmp/ccache-redirects/gcc
-    ln -s ccache /tmp/ccache-redirects/gcc-8
-    ln -s ccache /tmp/ccache-redirects/g++
-    ln -s ccache /tmp/ccache-redirects/g++-8
-    ln -s ccache /tmp/ccache-redirects/nvcc
-    ln -s ccache /tmp/ccache-redirects/clang++-3.9
-    ln -s ccache /tmp/ccache-redirects/clang-3.9
-    ln -s ccache /tmp/ccache-redirects/clang++-5.0
-    ln -s ccache /tmp/ccache-redirects/clang-5.0
-    ln -s ccache /tmp/ccache-redirects/clang++-6.0
-    ln -s ccache /tmp/ccache-redirects/clang-6.0
-    ln -s ccache /usr/local/bin/gcc
-    ln -s ccache /usr/local/bin/gcc-8
-    ln -s ccache /usr/local/bin/g++
-    ln -s ccache /usr/local/bin/g++-8
-    ln -s ccache /usr/local/bin/nvcc
-    ln -s ccache /usr/local/bin/clang++-3.9
-    ln -s ccache /usr/local/bin/clang-3.9
-    ln -s ccache /usr/local/bin/clang++-5.0
-    ln -s ccache /usr/local/bin/clang-5.0
-    ln -s ccache /usr/local/bin/clang++-6.0
-    ln -s ccache /usr/local/bin/clang-6.0
-
-    export NVCC=ccache
+    CCACHE=`which ccache`
+    ln -sf $CCACHE /tmp/ccache-redirects/gcc
+    ln -sf $CCACHE /tmp/ccache-redirects/gcc-8
+    ln -sf $CCACHE /tmp/ccache-redirects/g++
+    ln -sf $CCACHE /tmp/ccache-redirects/g++-8
+    ln -sf $CCACHE /tmp/ccache-redirects/clang++-3.9
+    ln -sf $CCACHE /tmp/ccache-redirects/clang-3.9
+    ln -sf $CCACHE /tmp/ccache-redirects/clang++-5.0
+    ln -sf $CCACHE /tmp/ccache-redirects/clang-5.0
+    ln -sf $CCACHE /tmp/ccache-redirects/clang++-6.0
+    ln -sf $CCACHE /tmp/ccache-redirects/clang-6.0
+    #Doesn't work: https://github.com/ccache/ccache/issues/373
+    # ln -sf $CCACHE /tmp/ccache-redirects/nvcc
+    # ln -sf $CCACHE /tmp/ccache-redirects/nvcc
+    # export NVCC="/tmp/ccache-redirects/nvcc"
 
     # Uncomment if you would like to debug CCache hit rates.
     # You can monitor using tail -f ccache-log
-    # export CCACHE_LOGFILE=/work/mxnet/ccache-log
-    # export CCACHE_DEBUG=1
+    #export CCACHE_LOGFILE=/work/mxnet/ccache-log
+    #export CCACHE_LOGFILE=/tmp/ccache-log
+    #export CCACHE_DEBUG=1
 }
 
 build_wheel() {
@@ -689,8 +681,7 @@ build_ubuntu_gpu_mkldnn_nocudnn() {
 
 build_ubuntu_gpu_cuda100_cudnn7() {
     set -ex
-    # unfortunately this build has problems in 3rdparty dependencies with ccache and make
-    # build_ccache_wrappers
+    build_ccache_wrappers
     make \
         DEV=1                                     \
         ENABLE_TESTCOVERAGE=1                     \