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/05/01 05:03:12 UTC

[GitHub] zheng-da commented on a change in pull request #10731: Fix a bug in getting MKLDNN memory

zheng-da commented on a change in pull request #10731: Fix a bug in getting MKLDNN memory
URL: https://github.com/apache/incubator-mxnet/pull/10731#discussion_r185166958
 
 

 ##########
 File path: ci/docker/runtime_functions.sh
 ##########
 @@ -313,16 +313,22 @@ build_ubuntu_amalgamation_min() {
 build_ubuntu_gpu_cmake_mkldnn() {
     set -ex
     cd /work/build
+    # We need to use generic archtecture. Otherwise, MKLDNN compiled in one
+    # CPU architecture (e.g., C5) can't run on another architecture (e.g., g3).
     cmake \
         -DUSE_CUDA=1               \
         -DUSE_CUDNN=1              \
         -DUSE_MKLML_MKL=1          \
         -DUSE_MKLDNN=1             \
         -DCMAKE_BUILD_TYPE=Release \
+        -DARCH_OPT_FLAGS="-mtune=generic" \
         -G Ninja                   \
         /work/mxnet
 
     ninja -v
+    # libmkldnn.so.0 is a link file. We need an actual binary file named libmkldnn.so.0.
+    cp 3rdparty/mkldnn/src/libmkldnn.so.0 3rdparty/mkldnn/src/libmkldnn.so.0.tmp
+    mv 3rdparty/mkldnn/src/libmkldnn.so.0.tmp 3rdparty/mkldnn/src/libmkldnn.so.0
 
 Review comment:
   what you provide is a different thing. it tries to figure out the path to a file. Here is to get a regular file from a link file.

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