You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mxnet.apache.org by GitBox <gi...@apache.org> on 2021/04/23 23:16:39 UTC

[GitHub] [incubator-mxnet] cyrusbehr opened a new issue #20211: Unable to cross compile for AArch64 CUDA

cyrusbehr opened a new issue #20211:
URL: https://github.com/apache/incubator-mxnet/issues/20211


   I've been struggling to cross compile mxnet on my x86 Ubuntu 18.04 device for AArch64 Ubuntu 18.04 target (nvnida jetson xavier nx).
   
   The instructions on [this page](https://mxnet.apache.org/versions/1.7/get_started/jetson_setup) are severely lacking, there are zero instructions for how to actual cross compile. 
   
   This is what I've tried: 
   ```
   git clone --recursive https://github.com/apache/incubator-mxnet ./mxnet
   cd mxnet
   git checkout tags/1.8.0
   git submodule update --init --recursive
   
   cd mxnet
   mkdir build
   cd build
   
    cmake\
    -DCMAKE_CUDA_COMPILER=/usr/local/cuda-10.2/bin/nvcc\
    -DOpenBLAS_INCLUDE_DIR=/usr/include/aarch64-linux-gnu\
    -DOpenBLAS_LIB=/usr/lib/aarch64-linux-gnu/libopenblas.so\
    -DCMAKE_TOOLCHAIN_FILE=../../tools/toolchain-aarch64.cmake \
    -DBLAS=open\
    -DUSE_CUDA=ON\
    -DUSE_CUDNN=ON\
    -DMXNET_CUDA_ARCH="7.2"\
    -DENABLE_CUDA_RTC=OFF\
    -DCMAKE_BUILD_TYPE=Release\
    -DUSE_F16C=OFF\
    -GNinja\
    -DUSE_LAPACK=OFF\
    -DUSE_LAPACK=OFF\
    -DUSE_JEMALLOC=OFF\
    -DUSE_CPP_PACKAGE=ON\
    -DUSE_SIGNAL_HANDLER=OFF\
    -DUSE_OPENCV=OFF\
    -DUSE_MKL_IF_AVAILABLE=OFF\
    -DUSE_MKLDNN=OFF\
    -DBUILD_CPP_EXAMPLES=OFF\
    -DCMAKE_INSTALL_PREFIX=./packaged\
    ..
   ```
   
   So things to note, I have the `aarch64-linux` cuda target installed at `/usr/local/cuda-10.2/targets/aarch64-linux`
   I also have the `arm64` version of OpenBlas installed at `/usr/lib/aarch64-linux-gnu/libopenblas.so`.
   
   Running the above cmake command outputs the following:
   
   ```
   (base) root@ebcd711a09ae:~/mxnet/build#  cmake\
   >  -DCMAKE_CUDA_COMPILER=/usr/local/cuda-10.2/bin/nvcc\
   >  -DOpenBLAS_INCLUDE_DIR=/usr/include/aarch64-linux-gnu\
   >  -DOpenBLAS_LIB=/usr/lib/aarch64-linux-gnu/libopenblas.so\
   >  -DCMAKE_TOOLCHAIN_FILE=../../tools/toolchain-aarch64.cmake \
   >  -DBLAS=open\
   >  -DUSE_CUDA=ON\
   >  -DUSE_CUDNN=ON\
   >  -DMXNET_CUDA_ARCH="7.2"\
   >  -DENABLE_CUDA_RTC=OFF\
   >  -DCMAKE_BUILD_TYPE=Release\
   >  -DUSE_F16C=OFF\
   >  -GNinja\
   >  -DUSE_LAPACK=OFF\
   >  -DUSE_LAPACK=OFF\
   >  -DUSE_JEMALLOC=OFF\
   >  -DUSE_CPP_PACKAGE=ON\
   >  -DUSE_SIGNAL_HANDLER=OFF\
   >  -DUSE_OPENCV=OFF\
   >  -DUSE_MKL_IF_AVAILABLE=OFF\
   >  -DUSE_MKLDNN=OFF\
   >  -DBUILD_CPP_EXAMPLES=OFF\
   >  -DCMAKE_INSTALL_PREFIX=./packaged\
   >  ..
   -- The C compiler identification is GNU 7.5.0
   -- The CXX compiler identification is GNU 7.5.0
   -- Detecting C compiler ABI info
   -- Detecting C compiler ABI info - done
   -- Check for working C compiler: /usr/bin/aarch64-linux-gnu-gcc - skipped
   -- Detecting C compile features
   -- Detecting C compile features - done
   -- Detecting CXX compiler ABI info
   -- Detecting CXX compiler ABI info - done
   -- Check for working CXX compiler: /usr/bin/aarch64-linux-gnu-g++ - skipped
   -- Detecting CXX compile features
   -- Detecting CXX compile features - done
   -- CMAKE_CROSSCOMPILING TRUE
   -- CMAKE_HOST_SYSTEM_PROCESSOR x86_64
   -- CMAKE_SYSTEM_PROCESSOR aarch64
   -- CMAKE_SYSTEM_NAME Linux
   -- CMake version '3.18.2' using generator 'Ninja'
   CMake Warning at CMakeLists.txt:103 (message):
     CMAKE_CUDA_COMPILER guessed: /usr/local/cuda/bin/nvcc
   
   
   -- The CUDA compiler identification is NVIDIA 10.2.89
   -- Detecting CUDA compiler ABI info
   -- Detecting CUDA compiler ABI info - done
   -- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc - skipped
   -- Detecting CUDA compile features
   -- Detecting CUDA compile features - done
   -- Could not find CCache. Consider installing CCache to speed up compilation.
   -- Performing Test SUPPORT_CXX11
   -- Performing Test SUPPORT_CXX11 - Success
   -- Performing Test SUPPORT_CXX0X
   -- Performing Test SUPPORT_CXX0X - Success
   -- Found OpenBLAS libraries: /usr/lib/aarch64-linux-gnu/libopenblas.so
   -- Found OpenBLAS include: /usr/include/aarch64-linux-gnu
   -- OpenCV Disabled
   -- Found OpenMP_C: -fopenmp (found version "4.5") 
   -- Found OpenMP_CXX: -fopenmp (found version "4.5") 
   -- Found OpenMP: TRUE (found version "4.5")  
   CMake Warning at 3rdparty/googletest/googletest/CMakeLists.txt:47 (project):
     VERSION keyword not followed by a value or was followed by a value that
     expanded to nothing.
   
   
   -- Found PythonInterp: /root/conda/bin/python (found version "3.8.3") 
   -- Looking for pthread.h
   -- Looking for pthread.h - found
   -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
   -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
   -- Found Threads: TRUE  
   -- Found GTest: gtest  
   -- Could NOT find CUDNN (missing: CUDNN_LIBRARY CUDNN_INCLUDE) 
   -- Found OpenMP_C: -fopenmp (found version "4.5") 
   -- Found OpenMP_CXX: -fopenmp (found version "4.5") 
   -- Looking for clock_gettime in rt
   -- Looking for clock_gettime in rt - found
   -- Looking for fopen64
   -- Looking for fopen64 - not found
   -- Looking for C++ include cxxabi.h
   -- Looking for C++ include cxxabi.h - found
   -- Looking for nanosleep
   -- Looking for nanosleep - found
   -- Looking for backtrace
   -- Looking for backtrace - found
   -- backtrace facility detected in default set of libraries
   -- Found Backtrace: /usr/aarch64-linux-gnu/include  
   -- Check if the system is big endian
   -- Searching 16 bit integer
   -- Looking for sys/types.h
   -- Looking for sys/types.h - found
   -- Looking for stdint.h
   -- Looking for stdint.h - found
   -- Looking for stddef.h
   -- Looking for stddef.h - found
   -- Check size of unsigned short
   -- Check size of unsigned short - done
   -- Searching 16 bit integer - Using unsigned short
   -- Check if the system is big endian - little endian
   -- /root/mxnet/3rdparty/dmlc-core/cmake/build_config.h.in -> include/dmlc/build_config.h
   -- Performing Test SUPPORT_MSSE2
   -- Performing Test SUPPORT_MSSE2 - Failed
   -- CUDA: Using the following NVCC architecture flags -gencode;arch=compute_72,code=sm_72
   -- Found CUDAToolkit: /usr/local/cuda/targets/aarch64-linux/include (found version "10.2.89") 
   Building without NVTX support.
   -- Performing Test SUPPORT_MSSE3
   -- Performing Test SUPPORT_MSSE3 - Failed
   -- CUDA: Adding NVCC options: --fatbin-options --compress-all
   CMake Warning at CMakeLists.txt:881 (message):
     OpenCV_VERSION_MAJOR: , version 3 with imgcodecs is required for im2rec,
     im2rec will not be available
   
   
   -- Configuring done
   You have changed variables that require your cache to be deleted.
   Configure will be re-run and you may have to reset some variables.
   The following variables have changed:
   CMAKE_CUDA_COMPILER= /usr/local/cuda-10.2/bin/nvcc
   CMAKE_CUDA_COMPILER= /usr/local/cuda-10.2/bin/nvcc
   
   -- The C compiler identification is GNU 7.5.0
   -- The CXX compiler identification is GNU 7.5.0
   -- Detecting C compiler ABI info
   -- Detecting C compiler ABI info - done
   -- Check for working C compiler: /usr/bin/aarch64-linux-gnu-gcc - skipped
   -- Detecting C compile features
   -- Detecting C compile features - done
   -- Detecting CXX compiler ABI info
   -- Detecting CXX compiler ABI info - done
   -- Check for working CXX compiler: /usr/bin/aarch64-linux-gnu-g++ - skipped
   -- Detecting CXX compile features
   -- Detecting CXX compile features - done
   -- CMAKE_CROSSCOMPILING FALSE
   -- CMAKE_HOST_SYSTEM_PROCESSOR x86_64
   -- CMAKE_SYSTEM_PROCESSOR x86_64
   -- CMAKE_SYSTEM_NAME Linux
   -- CMake version '3.18.2' using generator 'Ninja'
   CMake Warning at CMakeLists.txt:103 (message):
     CMAKE_CUDA_COMPILER guessed: /usr/local/cuda/bin/nvcc
   
   
   -- The CUDA compiler identification is NVIDIA 10.2.89
   -- Detecting CUDA compiler ABI info
   -- Detecting CUDA compiler ABI info - done
   -- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc - skipped
   -- Detecting CUDA compile features
   -- Detecting CUDA compile features - done
   -- Could not find CCache. Consider installing CCache to speed up compilation.
   -- Performing Test SUPPORT_CXX11
   -- Performing Test SUPPORT_CXX11 - Success
   -- Performing Test SUPPORT_CXX0X
   -- Performing Test SUPPORT_CXX0X - Success
   -- CMAKE_BUILD_TYPE is unset, defaulting to Release
   -- Intel MKL-DNN compat: set DNNL_BUILD_EXAMPLES to MKLDNN_BUILD_EXAMPLES with value `OFF`
   -- Intel MKL-DNN compat: set DNNL_BUILD_TESTS to MKLDNN_BUILD_TESTS with value `OFF`
   -- Intel MKL-DNN compat: set DNNL_ENABLE_JIT_PROFILING to MKLDNN_ENABLE_JIT_PROFILING with value `OFF`
   -- Intel MKL-DNN compat: set DNNL_LIBRARY_TYPE to MKLDNN_LIBRARY_TYPE with value `STATIC`
   -- Intel MKL-DNN compat: set DNNL_ARCH_OPT_FLAGS to MKLDNN_ARCH_OPT_FLAGS with value ``
   -- Looking for pthread.h
   -- Looking for pthread.h - found
   -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
   -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
   -- Looking for pthread_create in pthreads
   -- Looking for pthread_create in pthreads - not found
   -- Looking for pthread_create in pthread
   -- Looking for pthread_create in pthread - found
   -- Found Threads: TRUE  
   -- Found OpenMP_C: -fopenmp (found version "4.5") 
   -- Found OpenMP_CXX: -fopenmp (found version "4.5") 
   -- Found OpenMP: TRUE (found version "4.5")  
   -- GPU support is disabled
   -- Found Git: /usr/bin/git (found version "2.17.1") 
   -- Primitive cache is enabled
   -- Using intgemm
   CMake Warning at 3rdparty/intgemm/CMakeLists.txt:25 (message):
     Not building AVX512BW-based multiplication because your compiler is
     too old.
   
     For details rerun cmake with --debug-trycompile then try to build in
     compile_tests/CMakeFiles/CMakeTmp.
   
   
   CMake Warning at 3rdparty/intgemm/CMakeLists.txt:33 (message):
     Not building AVX512VNNI-based multiplication because your compiler is
     too old.
   
     For details rerun cmake with --debug-trycompile then try to build in
     compile_tests/CMakeFiles/CMakeTmp.
   
   
   -- Compiling with OpenMP
   -- Could NOT find MKL (missing: MKL_INCLUDE_DIR MKL_RT_LIBRARY) 
   -- Could not find OpenBLAS include. Turning OpenBLAS_FOUND off
   -- Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off
   CMake Error at cmake/Modules/FindOpenBLAS.cmake:82 (MESSAGE):
     Could not find OpenBLAS
   Call Stack (most recent call first):
     cmake/ChooseBlas.cmake:42 (find_package)
     CMakeLists.txt:325 (include)
   
   
   -- Configuring incomplete, errors occurred!
   See also "/root/mxnet/build/CMakeFiles/CMakeOutput.log".
   See also "/root/mxnet/build/CMakeFiles/CMakeError.log".
   You have changed variables that require your cache to be deleted.
   Configure will be re-run and you may have to reset some variables.
   The following variables have changed:
   CMAKE_CUDA_COMPILER= /usr/local/cuda-10.2/bin/nvcc
   
   -- Generating done
   CMake Generate step failed.  Build files cannot be regenerated correctly.
   ```
   
   It looks like it's complaining here:
   ```
   -- Configuring done
   You have changed variables that require your cache to be deleted.
   Configure will be re-run and you may have to reset some variables.
   The following variables have changed:
   CMAKE_CUDA_COMPILER= /usr/local/cuda-10.2/bin/nvcc
   CMAKE_CUDA_COMPILER= /usr/local/cuda-10.2/bin/nvcc
   ```
   
   Even if I don't specify `CMAKE_CUDA_COMPILER` in my cmake command, it still fails. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org


[GitHub] [incubator-mxnet] cyrusbehr closed issue #20211: Unable to cross compile for AArch64 CUDA

Posted by GitBox <gi...@apache.org>.
cyrusbehr closed issue #20211:
URL: https://github.com/apache/incubator-mxnet/issues/20211


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org


[GitHub] [incubator-mxnet] cyrusbehr commented on issue #20211: Unable to cross compile for AArch64 CUDA

Posted by GitBox <gi...@apache.org>.
cyrusbehr commented on issue #20211:
URL: https://github.com/apache/incubator-mxnet/issues/20211#issuecomment-826028353


   Building in that provided image worked, thank you so much! 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org


[GitHub] [incubator-mxnet] cyrusbehr commented on issue #20211: Unable to cross compile for AArch64 CUDA

Posted by GitBox <gi...@apache.org>.
cyrusbehr commented on issue #20211:
URL: https://github.com/apache/incubator-mxnet/issues/20211#issuecomment-825991092


   Thank you I will give this a try. 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org


[GitHub] [incubator-mxnet] leezu commented on issue #20211: Unable to cross compile for AArch64 CUDA

Posted by GitBox <gi...@apache.org>.
leezu commented on issue #20211:
URL: https://github.com/apache/incubator-mxnet/issues/20211#issuecomment-825989658


   Cross-compile for jetson is tested on CI via the following setup. You can use a similar setup locally:
   
   https://github.com/apache/incubator-mxnet/blob/e8ad36aeaa5de61ca073acbe598d853f63262721/ci/docker/Dockerfile.build.jetson#L23-L91
   
   and
   
   https://github.com/apache/incubator-mxnet/blob/e8ad36aeaa5de61ca073acbe598d853f63262721/ci/docker/runtime_functions.sh#L140-L155


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org