diff --git a/.github/workflows/os_x_staticbuild.yml b/.github/workflows/os_x_staticbuild.yml index eabe88f46053..6e313a025f51 100644 --- a/.github/workflows/os_x_staticbuild.yml +++ b/.github/workflows/os_x_staticbuild.yml @@ -10,7 +10,7 @@ jobs: uses: actions/checkout@v2 - name: Install Dependencies run: | - brew install nasm automake ninja libtool + brew install nasm automake ninja libtool cmake pkgconfig protobuf - name: Build project run: | git --version diff --git a/CMakeLists.txt b/CMakeLists.txt index f59c7b999e17..1c3b566e2cfd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,6 +46,7 @@ else() endif() option(USE_GPERFTOOLS "Build with GPerfTools support" OFF) option(USE_JEMALLOC "Build with Jemalloc support" OFF) +option(USE_LIBJPEG_TURBO "Use libjpeg-turbo" OFF) option(USE_DIST_KVSTORE "Build with DIST_KVSTORE support" OFF) option(USE_PLUGINS_WARPCTC "Use WARPCTC Plugins" OFF) option(USE_PLUGIN_CAFFE "Use Caffe Plugin" OFF) @@ -370,6 +371,15 @@ if(USE_JEMALLOC) endif() endif() +if(USE_LIBJPEG_TURBO) + # We can switch from pkgconfig to libjpeg-turboConfig.cmake once libjpeg-turbo + # 2.1 is released https://github.com/libjpeg-turbo/libjpeg-turbo/pull/342 + find_package(PkgConfig REQUIRED) + pkg_search_module(TURBOJPEG REQUIRED libturbojpeg) + include_directories(SYSTEM ${TURBOJPEG_INCLUDE_DIRS}) + list(APPEND mxnet_LINKER_LIBS ${TURBOJPEG_LIBRARIES}) +endif() + # ---[ OpenCV if(USE_OPENCV) find_package(OpenCV COMPONENTS core highgui imgproc imgcodecs) @@ -663,6 +673,12 @@ if(UNIX) target_link_libraries(mxnet PRIVATE mxnet_static) target_link_libraries(mxnet_static PUBLIC ${CMAKE_DL_LIBS}) set_target_properties(mxnet_static PROPERTIES OUTPUT_NAME mxnet) + if(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") + target_compile_options(mxnet_static PRIVATE -Werror) + if(USE_CUDA) + set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -Werror cross-execution-space-call) + endif() + endif() elseif(MSVC) if(USE_CUDA) if(MSVC) diff --git a/ci/docker/install/centos7_base.sh b/ci/docker/install/centos7_base.sh index 3b84aeb57b06..4925638c3827 100755 --- a/ci/docker/install/centos7_base.sh +++ b/ci/docker/install/centos7_base.sh @@ -27,7 +27,14 @@ yum -y install epel-release yum -y install git yum -y install wget yum -y install make -yum -y install cmake yum -y install unzip yum -y install ninja-build yum -y install gcc-gfortran + +# CMake 3.13.2+ is required +mkdir /opt/cmake && cd /opt/cmake +wget -nv https://cmake.org/files/v3.13/cmake-3.13.5-Linux-x86_64.sh +sh cmake-3.13.5-Linux-x86_64.sh --prefix=/opt/cmake --skip-license +ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake +rm cmake-3.13.5-Linux-x86_64.sh +cmake --version diff --git a/ci/docker/install/centos7_core.sh b/ci/docker/install/centos7_core.sh index 577f9dba7439..80b00e44704a 100755 --- a/ci/docker/install/centos7_core.sh +++ b/ci/docker/install/centos7_core.sh @@ -33,7 +33,14 @@ yum -y install opencv-devel yum -y install openssl-devel yum -y install gcc-c++-4.8.* yum -y install make -yum -y install cmake yum -y install wget yum -y install unzip yum -y install ninja-build + +# CMake 3.13.2+ is required +mkdir /opt/cmake && cd /opt/cmake +wget -nv https://cmake.org/files/v3.13/cmake-3.13.5-Linux-x86_64.sh +sh cmake-3.13.5-Linux-x86_64.sh --prefix=/opt/cmake --skip-license +ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake +rm cmake-3.13.5-Linux-x86_64.sh +cmake --version diff --git a/ci/docker/install/ubuntu_core.sh b/ci/docker/install/ubuntu_core.sh index 2773aa26246c..9ff3ac70b859 100755 --- a/ci/docker/install/ubuntu_core.sh +++ b/ci/docker/install/ubuntu_core.sh @@ -47,6 +47,8 @@ apt-get install -y \ zlib1g-dev \ libedit-dev \ libxml2-dev \ + libprotobuf-dev \ + protobuf-compiler \ ninja-build \ software-properties-common \ sudo \ diff --git a/ci/docker/runtime_functions.sh b/ci/docker/runtime_functions.sh index 0c7630f24015..3c84033094c6 100755 --- a/ci/docker/runtime_functions.sh +++ b/ci/docker/runtime_functions.sh @@ -156,70 +156,55 @@ gather_licenses() { build_ubuntu_cpu_release() { set -ex - - build_ccache_wrappers - - make \ - DEV=0 \ - ENABLE_TESTCOVERAGE=0 \ - USE_CPP_PACKAGE=0 \ - USE_MKLDNN=0 \ - USE_BLAS=openblas \ - USE_SIGNAL_HANDLER=1 \ - -j$(nproc) + pushd . + cd /work/build + cmake \ + -DUSE_MKL_IF_AVAILABLE=OFF \ + -DUSE_MKLDNN=OFF \ + -DUSE_CUDA=OFF \ + -G Ninja /work/mxnet + ninja + popd } build_ubuntu_cpu_mkldnn_release() { set -ex - - build_ccache_wrappers - - make \ - DEV=0 \ - ENABLE_TESTCOVERAGE=0 \ - USE_CPP_PACKAGE=0 \ - USE_MKLDNN=1 \ - USE_BLAS=openblas \ - USE_SIGNAL_HANDLER=1 \ - -j$(nproc) + pushd . + cmake \ + -DUSE_MKL_IF_AVAILABLE=OFF \ + -DUSE_MKLDNN=ON \ + -DUSE_CUDA=OFF \ + -G Ninja /work/mxnet + ninja + popd } build_ubuntu_gpu_release() { set -ex - # unfortunately this build has problems in 3rdparty dependencies with ccache and make - # build_ccache_wrappers - - make \ - DEV=0 \ - ENABLE_TESTCOVERAGE=0 \ - USE_BLAS=openblas \ - USE_MKLDNN=0 \ - USE_CUDA=1 \ - USE_CUDA_PATH=/usr/local/cuda \ - USE_CUDNN=1 \ - USE_CPP_PACKAGE=0 \ - USE_DIST_KVSTORE=1 \ - USE_SIGNAL_HANDLER=1 \ - -j$(nproc) + pushd . + cmake \ + -DUSE_MKL_IF_AVAILABLE=OFF \ + -DUSE_MKLDNN=OFF \ + -DUSE_DIST_KVSTORE=ON \ + -DUSE_CUDA=ON \ + -DMXNET_CUDA_ARCH="$CI_CMAKE_CUDA_ARCH" \ + -G Ninja /work/mxnet + ninja + popd } build_ubuntu_gpu_mkldnn_release() { set -ex - # unfortunately this build has problems in 3rdparty dependencies with ccache and make - # build_ccache_wrappers - - make \ - DEV=0 \ - ENABLE_TESTCOVERAGE=0 \ - USE_BLAS=openblas \ - USE_MKLDNN=1 \ - USE_CUDA=1 \ - USE_CUDA_PATH=/usr/local/cuda \ - USE_CUDNN=1 \ - USE_CPP_PACKAGE=0 \ - USE_DIST_KVSTORE=1 \ - USE_SIGNAL_HANDLER=1 \ - -j$(nproc) + pushd . + cmake \ + -DUSE_MKL_IF_AVAILABLE=OFF \ + -DUSE_MKLDNN=ON \ + -DUSE_DIST_KVSTORE=ON \ + -DUSE_CUDA=ON \ + -DMXNET_CUDA_ARCH="$CI_CMAKE_CUDA_ARCH" \ + -G Ninja /work/mxnet + ninja + popd } # Compiles the dynamic mxnet library @@ -249,14 +234,22 @@ build_dynamic_libmxnet() { build_jetson() { set -ex pushd . - - #build_ccache_wrappers - - cp make/crosscompile.jetson.mk ./config.mk - make -j$(nproc) - - build_wheel /work/mxnet/python /work/mxnet/lib - popd + cd /work/build + cmake \ + -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} \ + -DUSE_CUDA=ON \ + -DUSE_CUDNN=ON \ + -DCMAKE_CUDA_COMPILER=/usr/local/cuda-9.0/targets/aarch64-linux/bin/nvcc \ + -DSUPPORT_F16C=OFF \ + -DUSE_OPENCV=OFF\ + -DUSE_OPENMP=ON \ + -DUSE_LAPACK=OFF\ + -DUSE_SIGNAL_HANDLER=ON\ + -DCMAKE_BUILD_TYPE=Release\ + -DUSE_MKL_IF_AVAILABLE=OFF\ + -G Ninja /work/mxnet + ninja + build_wheel } # @@ -358,7 +351,6 @@ build_android_armv7() { -DUSE_OPENCV=OFF\ -DUSE_OPENMP=OFF\ -DUSE_SIGNAL_HANDLER=ON\ - -DCMAKE_BUILD_TYPE=RelWithDebInfo\ -DUSE_MKL_IF_AVAILABLE=OFF\ -G Ninja /work/mxnet ninja @@ -376,7 +368,6 @@ build_android_armv8() { -DUSE_OPENCV=OFF\ -DUSE_OPENMP=OFF\ -DUSE_SIGNAL_HANDLER=ON\ - -DCMAKE_BUILD_TYPE=RelWithDebInfo\ -DUSE_MKL_IF_AVAILABLE=OFF\ -G Ninja /work/mxnet ninja @@ -384,19 +375,17 @@ build_android_armv8() { build_centos7_cpu() { set -ex - cd /work/mxnet - export CC="ccache gcc" - export CXX="ccache g++" - build_ccache_wrappers - make \ - DEV=1 \ - USE_LAPACK=1 \ - USE_LAPACK_PATH=/usr/lib64/liblapack.so \ - USE_BLAS=openblas \ - USE_MKLDNN=0 \ - USE_DIST_KVSTORE=1 \ - USE_SIGNAL_HANDLER=1 \ - -j$(nproc) + pushd . + cmake \ + -DCMAKE_BUILD_TYPE="RelWithDebInfo" \ + -DUSE_MKL_IF_AVAILABLE=OFF \ + -DUSE_MKLDNN=OFF \ + -DUSE_DIST_KVSTORE=ON \ + -DUSE_CUDA=ON \ + -DMXNET_CUDA_ARCH="$CI_CMAKE_CUDA_ARCH" \ + -G Ninja /work/mxnet + ninja + popd } build_amzn_linux_cpu() { @@ -417,36 +406,30 @@ build_amzn_linux_cpu() { build_centos7_mkldnn() { set -ex - cd /work/mxnet - export CC="ccache gcc" - export CXX="ccache g++" - build_ccache_wrappers - make \ - DEV=1 \ - USE_LAPACK=1 \ - USE_LAPACK_PATH=/usr/lib64/liblapack.so \ - USE_BLAS=openblas \ - USE_SIGNAL_HANDLER=1 \ - -j$(nproc) + pushd . + cmake \ + -DCMAKE_BUILD_TYPE="RelWithDebInfo" \ + -DUSE_MKL_IF_AVAILABLE=OFF \ + -DUSE_MKLDNN=ON \ + -DUSE_CUDA=OFF \ + -G Ninja /work/mxnet + ninja + popd } build_centos7_gpu() { set -ex - cd /work/mxnet - # unfortunately this build has problems in 3rdparty dependencies with ccache and make - build_ccache_wrappers - make \ - DEV=1 \ - USE_LAPACK=1 \ - USE_LAPACK_PATH=/usr/lib64/liblapack.so \ - USE_BLAS=openblas \ - USE_MKLDNN=0 \ - USE_CUDA=1 \ - USE_CUDA_PATH=/usr/local/cuda \ - USE_CUDNN=1 \ - USE_DIST_KVSTORE=1 \ - CUDA_ARCH="$CI_CUDA_COMPUTE_CAPABILITIES" \ - -j$(nproc) + pushd . + cmake \ + -DCMAKE_BUILD_TYPE="RelWithDebInfo" \ + -DUSE_MKL_IF_AVAILABLE=OFF \ + -DUSE_MKLDNN=ON \ + -DUSE_CUDA=ON \ + -DMXNET_CUDA_ARCH="$CI_CMAKE_CUDA_ARCH" \ + -DUSE_DIST_KVSTORE=ON\ + -G Ninja /work/mxnet + ninja + popd } build_ubuntu_cpu() { @@ -455,36 +438,40 @@ build_ubuntu_cpu() { build_ubuntu_cpu_openblas() { set -ex - export CC="gcc" - export CXX="g++" - build_ccache_wrappers - make \ - DEV=1 \ - USE_TVM_OP=1 \ - USE_CPP_PACKAGE=1 \ - USE_BLAS=openblas \ - USE_MKLDNN=0 \ - USE_DIST_KVSTORE=1 \ - USE_LIBJPEG_TURBO=1 \ - USE_SIGNAL_HANDLER=1 \ - -j$(nproc) - make cython PYTHON=python3 + pushd . + cmake \ + -DCMAKE_BUILD_TYPE="RelWithDebInfo" \ + -DUSE_TVM_OP=ON \ + -DUSE_CPP_PACKAGE=ON \ + -DUSE_MKL_IF_AVAILABLE=OFF \ + -DUSE_MKLDNN=OFF \ + -DUSE_CUDA=OFF \ + -DUSE_DIST_KVSTORE=ON \ + -DBUILD_CYTHON_MODULES=ON \ + -DUSE_LIBJPEG_TURBO=ON \ + -G Ninja /work/mxnet + ninja + popd } build_ubuntu_cpu_mkl() { set -ex - export CC="ccache gcc" - export CXX="ccache g++" - make \ - DEV=1 \ - USE_CPP_PACKAGE=1 \ - USE_BLAS=mkl \ - USE_TVM_OP=1 \ - USE_MKLDNN=0 \ - USE_INTEL_PATH=/opt/intel \ - USE_DIST_KVSTORE=1 \ - USE_SIGNAL_HANDLER=1 \ - -j$(nproc) + pushd . + cmake \ + -DCMAKE_BUILD_TYPE="RelWithDebInfo" \ + -DUSE_TVM_OP=ON \ + -DUSE_CPP_PACKAGE=ON \ + -DUSE_MKL_IF_AVAILABLE=ON \ + -DBLAS="MKL" \ + -DMKL_PATH="/opt/intel" \ + -DUSE_MKLDNN=OFF \ + -DUSE_CUDA=OFF \ + -DUSE_DIST_KVSTORE=ON \ + -DBUILD_CYTHON_MODULES=ON \ + -G Ninja /work/mxnet + # TODO -DDEV=ON + ninja + popd } build_ubuntu_cpu_cmake_debug() { @@ -495,7 +482,6 @@ build_ubuntu_cpu_cmake_debug() { cmake \ -DUSE_CUDA=OFF \ -DUSE_TVM_OP=ON \ - -DPython3_EXECUTABLE=/usr/bin/python3 \ -DUSE_MKL_IF_AVAILABLE=OFF \ -DUSE_OPENMP=OFF \ -DUSE_OPENCV=ON \ @@ -503,7 +489,6 @@ build_ubuntu_cpu_cmake_debug() { -DCMAKE_BUILD_TYPE=Debug \ -G Ninja \ /work/mxnet - ninja popd } @@ -516,7 +501,6 @@ build_ubuntu_cpu_cmake_no_tvm_op() { cmake \ -DUSE_CUDA=OFF \ -DUSE_TVM_OP=OFF \ - -DPython3_EXECUTABLE=/usr/bin/python3 \ -DUSE_MKL_IF_AVAILABLE=OFF \ -DUSE_OPENMP=OFF \ -DUSE_OPENCV=ON \ @@ -560,55 +544,49 @@ build_ubuntu_cpu_cmake_asan() { build_ubuntu_cpu_clang39() { set -ex - export CXX=clang++-3.9 - export CC=clang-3.9 - build_ccache_wrappers - make \ - USE_CPP_PACKAGE=1 \ - USE_BLAS=openblas \ - USE_MKLDNN=0 \ - USE_OPENMP=0 \ - USE_DIST_KVSTORE=1 \ - -j$(nproc) + pushd . + cd /work/build + CXX=clang++-3.9 CC=clang-3.9 cmake \ + -DUSE_MKL_IF_AVAILABLE=OFF \ + -DUSE_MKLDNN=OFF \ + -DUSE_CUDA=OFF \ + -DUSE_OPENMP=OFF \ + -DUSE_DIST_KVSTORE=ON \ + -DUSE_CPP_PACKAGE=ON \ + -G Ninja /work/mxnet + ninja + popd } build_ubuntu_cpu_clang60() { set -ex - - export CXX=clang++-6.0 - export CC=clang-6.0 - - build_ccache_wrappers - - make \ - USE_CPP_PACKAGE=1 \ - USE_BLAS=openblas \ - USE_MKLDNN=0 \ - USE_OPENMP=1 \ - USE_DIST_KVSTORE=1 \ - -j$(nproc) + pushd . + cd /work/build + CXX=clang++-6.0 CC=clang-6.0 cmake \ + -DUSE_MKL_IF_AVAILABLE=OFF \ + -DUSE_MKLDNN=OFF \ + -DUSE_CUDA=OFF \ + -DUSE_OPENMP=ON \ + -DUSE_DIST_KVSTORE=ON \ + -DUSE_CPP_PACKAGE=ON \ + -G Ninja /work/mxnet + ninja + popd } build_ubuntu_cpu_clang_tidy() { set -ex - - export CXX=clang++-6.0 - export CC=clang-6.0 - export CLANG_TIDY=/usr/lib/llvm-6.0/share/clang/run-clang-tidy.py - pushd . cd /work/build - build_ccache_wrappers - cmake \ - -DUSE_CUDA=OFF \ - -DUSE_MKLDNN=OFF \ - -DUSE_MKL_IF_AVAILABLE=OFF \ - -DUSE_OPENCV=ON \ - -DCMAKE_BUILD_TYPE=Debug \ - -G Ninja \ - -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ - /work/mxnet - + export CLANG_TIDY=/usr/lib/llvm-6.0/share/clang/run-clang-tidy.py + CXX=clang++-6.0 CC=clang-6.0 cmake \ + -DUSE_MKL_IF_AVAILABLE=OFF \ + -DUSE_MKLDNN=OFF \ + -DUSE_CUDA=OFF \ + -DCMAKE_BUILD_TYPE=Debug \ + -DUSE_DIST_KVSTORE=ON \ + -DUSE_CPP_PACKAGE=ON \ + -G Ninja /work/mxnet ninja cd /work/mxnet $CLANG_TIDY -p /work/build -j $(nproc) -clang-tidy-binary clang-tidy-6.0 /work/mxnet/src @@ -617,63 +595,63 @@ build_ubuntu_cpu_clang_tidy() { build_ubuntu_cpu_clang39_mkldnn() { set -ex - - export CXX=clang++-3.9 - export CC=clang-3.9 - - build_ccache_wrappers - - make \ - USE_CPP_PACKAGE=1 \ - USE_BLAS=openblas \ - USE_OPENMP=0 \ - USE_SIGNAL_HANDLER=1 \ - -j$(nproc) + pushd . + cd /work/build + CXX=clang++-3.9 CC=clang-3.9 cmake \ + -DUSE_MKL_IF_AVAILABLE=OFF \ + -DUSE_MKLDNN=ON \ + -DUSE_CUDA=OFF \ + -DUSE_CPP_PACKAGE=ON \ + -DUSE_OPENMP=OFF \ + -G Ninja /work/mxnet + ninja + popd } build_ubuntu_cpu_clang60_mkldnn() { set -ex - - export CXX=clang++-6.0 - export CC=clang-6.0 - - build_ccache_wrappers - - make \ - USE_CPP_PACKAGE=1 \ - USE_BLAS=openblas \ - USE_OPENMP=1 \ - USE_SIGNAL_HANDLER=1 \ - -j$(nproc) + pushd . + cd /work/build + CXX=clang++-6.0 CC=clang-6.0 cmake \ + -DUSE_MKL_IF_AVAILABLE=OFF \ + -DUSE_MKLDNN=ON \ + -DUSE_CUDA=OFF \ + -DUSE_CPP_PACKAGE=ON \ + -G Ninja /work/mxnet + ninja + popd } build_ubuntu_cpu_mkldnn() { set -ex - - build_ccache_wrappers - - make \ - DEV=1 \ - USE_CPP_PACKAGE=1 \ - USE_TVM_OP=1 \ - USE_BLAS=openblas \ - USE_SIGNAL_HANDLER=1 \ - -j$(nproc) + pushd . + cd /work/build + cmake \ + -DCMAKE_BUILD_TYPE="RelWithDebInfo" \ + -DUSE_MKL_IF_AVAILABLE=OFF \ + -DUSE_TVM_OP=ON \ + -DUSE_MKLDNN=ON \ + -DUSE_CUDA=OFF \ + -DUSE_CPP_PACKAGE=ON \ + -G Ninja /work/mxnet + ninja + popd } build_ubuntu_cpu_mkldnn_mkl() { set -ex - - build_ccache_wrappers - - make \ - DEV=1 \ - USE_CPP_PACKAGE=1 \ - USE_TVM_OP=1 \ - USE_BLAS=mkl \ - USE_SIGNAL_HANDLER=1 \ - USE_INTEL_PATH=/opt/intel/ \ - -j$(nproc) + pushd . + cd /work/build + cmake \ + -DCMAKE_BUILD_TYPE="RelWithDebInfo" \ + -DUSE_MKL_IF_AVAILABLE=ON \ + -DBLAS="MKL" \ + -DUSE_TVM_OP=ON \ + -DUSE_CUDA=OFF \ + -DUSE_CPP_PACKAGE=ON \ + -G Ninja /work/mxnet + ninja + popd } build_ubuntu_gpu() { @@ -735,96 +713,93 @@ build_ubuntu_gpu_tensorrt() { build_ubuntu_gpu_mkldnn() { set -ex - - build_ccache_wrappers - - make \ - DEV=1 \ - USE_CPP_PACKAGE=1 \ - USE_BLAS=openblas \ - USE_CUDA=1 \ - USE_CUDA_PATH=/usr/local/cuda \ - USE_CUDNN=1 \ - USE_TVM_OP=1 \ - CUDA_ARCH="$CI_CUDA_COMPUTE_CAPABILITIES" \ - USE_SIGNAL_HANDLER=1 \ - -j$(nproc) + pushd . + cd /work/build + cmake \ + -DCMAKE_BUILD_TYPE="RelWithDebInfo" \ + -DUSE_MKL_IF_AVAILABLE=OFF \ + -DUSE_TVM_OP=ON \ + -DUSE_CUDA=ON \ + -DMXNET_CUDA_ARCH="$CI_CMAKE_CUDA_ARCH" \ + -DUSE_CPP_PACKAGE=ON \ + -G Ninja /work/mxnet + ninja + popd } build_ubuntu_gpu_mkldnn_nocudnn() { set -ex - - build_ccache_wrappers - - make \ - DEV=1 \ - USE_BLAS=openblas \ - USE_CUDA=1 \ - USE_CUDA_PATH=/usr/local/cuda \ - USE_CUDNN=0 \ - USE_TVM_OP=1 \ - CUDA_ARCH="$CI_CUDA_COMPUTE_CAPABILITIES" \ - USE_SIGNAL_HANDLER=1 \ - -j$(nproc) + pushd . + cd /work/build + cmake \ + -DCMAKE_BUILD_TYPE="RelWithDebInfo" \ + -DUSE_MKL_IF_AVAILABLE=OFF \ + -DUSE_TVM_OP=ON \ + -DUSE_CUDA=ON \ + -DMXNET_CUDA_ARCH="$CI_CMAKE_CUDA_ARCH" \ + -DUSE_CUDNN=OFF \ + -DUSE_CPP_PACKAGE=ON \ + -G Ninja /work/mxnet + ninja + popd } build_ubuntu_gpu_cuda101_cudnn7() { set -ex - build_ccache_wrappers - make \ - DEV=1 \ - USE_BLAS=openblas \ - USE_MKLDNN=0 \ - USE_CUDA=1 \ - USE_CUDA_PATH=/usr/local/cuda \ - USE_CUDNN=1 \ - USE_TVM_OP=1 \ - USE_CPP_PACKAGE=1 \ - USE_DIST_KVSTORE=1 \ - CUDA_ARCH="$CI_CUDA_COMPUTE_CAPABILITIES" \ - USE_SIGNAL_HANDLER=1 \ - -j$(nproc) - make cython PYTHON=python3 + pushd . + cd /work/build + cmake \ + -DCMAKE_BUILD_TYPE="RelWithDebInfo" \ + -DUSE_MKL_IF_AVAILABLE=OFF \ + -DUSE_TVM_OP=ON \ + -DUSE_CUDA=ON \ + -DMXNET_CUDA_ARCH="$CI_CMAKE_CUDA_ARCH" \ + -DUSE_CUDNN=ON \ + -DUSE_MKLDNN=OFF \ + -DUSE_CPP_PACKAGE=ON \ + -DBUILD_CYTHON_MODULES=ON \ + -G Ninja /work/mxnet + ninja + popd } build_ubuntu_gpu_cuda101_cudnn7_mkldnn_cpp_test() { set -ex - build_ccache_wrappers - make \ - DEV=1 \ - USE_BLAS=openblas \ - USE_MKLDNN=1 \ - USE_CUDA=1 \ - USE_CUDA_PATH=/usr/local/cuda \ - USE_CUDNN=1 \ - USE_TVM_OP=0 \ - USE_CPP_PACKAGE=1 \ - USE_DIST_KVSTORE=1 \ - CUDA_ARCH="$CI_CUDA_COMPUTE_CAPABILITIES" \ - USE_SIGNAL_HANDLER=1 \ - -j$(nproc) - make test USE_CPP_PACKAGE=1 -j$(nproc) - make cython PYTHON=python3 + pushd . + cd /work/build + cmake \ + -DCMAKE_BUILD_TYPE="RelWithDebInfo" \ + -DUSE_MKL_IF_AVAILABLE=OFF \ + -DUSE_TVM_OP=OFF \ + -DUSE_CUDA=ON \ + -DMXNET_CUDA_ARCH="$CI_CMAKE_CUDA_ARCH" \ + -DUSE_CUDNN=ON \ + -DUSE_MKLDNN=ON \ + -DUSE_CPP_PACKAGE=ON \ + -DBUILD_CYTHON_MODULES=ON \ + -DUSE_DIST_KVSTORE=ON \ + -G Ninja /work/mxnet + ninja + popd } build_ubuntu_gpu_cuda101_cudnn7_no_tvm_op() { set -ex - build_ccache_wrappers - make \ - DEV=1 \ - USE_BLAS=openblas \ - USE_MKLDNN=0 \ - USE_CUDA=1 \ - USE_CUDA_PATH=/usr/local/cuda \ - USE_CUDNN=1 \ - USE_TVM_OP=0 \ - USE_CPP_PACKAGE=1 \ - USE_DIST_KVSTORE=1 \ - CUDA_ARCH="$CI_CUDA_COMPUTE_CAPABILITIES" \ - USE_SIGNAL_HANDLER=1 \ - -j$(nproc) - - make cython PYTHON=python3 + pushd . + cd /work/build + cmake \ + -DCMAKE_BUILD_TYPE="RelWithDebInfo" \ + -DUSE_MKL_IF_AVAILABLE=OFF \ + -DUSE_TVM_OP=OFF \ + -DUSE_CUDA=ON \ + -DMXNET_CUDA_ARCH="$CI_CMAKE_CUDA_ARCH" \ + -DUSE_CUDNN=ON \ + -DUSE_MKLDNN=OFF \ + -DBUILD_CYTHON_MODULES=ON \ + -DUSE_DIST_KVSTORE=ON \ + -G Ninja /work/mxnet + ninja + popd } build_ubuntu_amalgamation() { @@ -984,7 +959,8 @@ build_ubuntu_blc() { sanity_check() { set -ex tools/license_header.py check - make cpplint rcpplint jnilint + make cpplint jnilint + make -f R-package/Makefile rcpplint make pylint nosetests-3.4 tests/tutorials/test_sanity_tutorials.py } @@ -1623,18 +1599,19 @@ build_docs_setup() { build_ubuntu_cpu_docs() { set -ex - export CC="gcc" - export CXX="g++" - build_ccache_wrappers - make \ - DEV=1 \ - USE_CPP_PACKAGE=1 \ - USE_BLAS=openblas \ - USE_MKLDNN=0 \ - USE_DIST_KVSTORE=1 \ - USE_LIBJPEG_TURBO=1 \ - USE_SIGNAL_HANDLER=1 \ - -j$(nproc) + pushd . + cd /work/build + cmake \ + -DCMAKE_BUILD_TYPE="RelWithDebInfo" \ + -DUSE_MKL_IF_AVAILABLE=OFF \ + -DUSE_MKLDNN=OFF \ + -DUSE_CUDA=OFF \ + -DUSE_CPP_PACKAGE=ON \ + -DUSE_DIST_KVSTORE=ON \ + -DUSE_LIBJPEG_TURBO=ON \ + -G Ninja /work/mxnet + ninja + popd } diff --git a/config/distribution/darwin_cpu.cmake b/config/distribution/darwin_cpu.cmake index 792c19cf52f7..14bf57964c75 100644 --- a/config/distribution/darwin_cpu.cmake +++ b/config/distribution/darwin_cpu.cmake @@ -30,3 +30,4 @@ set(USE_LAPACK ON CACHE BOOL "Build with lapack support") set(USE_TVM_OP OFF CACHE BOOL "Enable use of TVM operator build system.") set(USE_SSE ON CACHE BOOL "Build with x86 SSE instruction support") set(USE_F16C OFF CACHE BOOL "Build with x86 F16C instruction support") +set(USE_LIBJPEG_TURBO ON CACHE BOOL "Build with libjpeg-turbo") diff --git a/config/distribution/linux_cpu.cmake b/config/distribution/linux_cpu.cmake index cad348578454..15b4f5aa7e59 100644 --- a/config/distribution/linux_cpu.cmake +++ b/config/distribution/linux_cpu.cmake @@ -28,3 +28,4 @@ set(USE_LAPACK ON CACHE BOOL "Build with lapack support") set(USE_TVM_OP OFF CACHE BOOL "Enable use of TVM operator build system.") set(USE_SSE ON CACHE BOOL "Build with x86 SSE instruction support") set(USE_F16C OFF CACHE BOOL "Build with x86 F16C instruction support") +set(USE_LIBJPEG_TURBO ON CACHE BOOL "Build with libjpeg-turbo") diff --git a/config/distribution/linux_cu100.cmake b/config/distribution/linux_cu100.cmake index d26b4d73eee7..bdbec7e63005 100644 --- a/config/distribution/linux_cu100.cmake +++ b/config/distribution/linux_cu100.cmake @@ -29,6 +29,7 @@ set(USE_LAPACK ON CACHE BOOL "Build with lapack support") set(USE_TVM_OP OFF CACHE BOOL "Enable use of TVM operator build system.") set(USE_SSE ON CACHE BOOL "Build with x86 SSE instruction support") set(USE_F16C OFF CACHE BOOL "Build with x86 F16C instruction support") +set(USE_LIBJPEG_TURBO ON CACHE BOOL "Build with libjpeg-turbo") set(CUDACXX "/usr/local/cuda-10.0/bin/nvcc" CACHE STRING "Cuda compiler") set(MXNET_CUDA_ARCH "3.0;5.0;6.0;7.0;7.5" CACHE STRING "Cuda architectures") diff --git a/config/distribution/linux_cu101.cmake b/config/distribution/linux_cu101.cmake index aaf76cc10df1..fd773e88193b 100644 --- a/config/distribution/linux_cu101.cmake +++ b/config/distribution/linux_cu101.cmake @@ -31,6 +31,7 @@ set(USE_LAPACK ON CACHE BOOL "Build with lapack support") set(USE_TVM_OP OFF CACHE BOOL "Enable use of TVM operator build system.") set(USE_SSE ON CACHE BOOL "Build with x86 SSE instruction support") set(USE_F16C OFF CACHE BOOL "Build with x86 F16C instruction support") +set(USE_LIBJPEG_TURBO ON CACHE BOOL "Build with libjpeg-turbo") set(CUDACXX "/usr/local/cuda-10.1/bin/nvcc" CACHE STRING "Cuda compiler") set(MXNET_CUDA_ARCH "3.0;5.0;6.0;7.0;7.5" CACHE STRING "Cuda architectures") diff --git a/config/distribution/linux_cu102.cmake b/config/distribution/linux_cu102.cmake index 6b575683e919..9f740f543ecb 100644 --- a/config/distribution/linux_cu102.cmake +++ b/config/distribution/linux_cu102.cmake @@ -29,6 +29,7 @@ set(USE_LAPACK ON CACHE BOOL "Build with lapack support") set(USE_TVM_OP OFF CACHE BOOL "Enable use of TVM operator build system.") set(USE_SSE ON CACHE BOOL "Build with x86 SSE instruction support") set(USE_F16C OFF CACHE BOOL "Build with x86 F16C instruction support") +set(USE_LIBJPEG_TURBO ON CACHE BOOL "Build with libjpeg-turbo") set(CUDACXX "/usr/local/cuda-10.2/bin/nvcc" CACHE STRING "Cuda compiler") set(MXNET_CUDA_ARCH "3.0;5.0;6.0;7.0;7.5" CACHE STRING "Cuda architectures") diff --git a/config/distribution/linux_cu75.cmake b/config/distribution/linux_cu75.cmake index 45ba2b9de5d7..91ef97150519 100644 --- a/config/distribution/linux_cu75.cmake +++ b/config/distribution/linux_cu75.cmake @@ -29,6 +29,7 @@ set(USE_LAPACK ON CACHE BOOL "Build with lapack support") set(USE_TVM_OP OFF CACHE BOOL "Enable use of TVM operator build system.") set(USE_SSE ON CACHE BOOL "Build with x86 SSE instruction support") set(USE_F16C OFF CACHE BOOL "Build with x86 F16C instruction support") +set(USE_LIBJPEG_TURBO ON CACHE BOOL "Build with libjpeg-turbo") set(CUDACXX "/usr/local/cuda-7.5/bin/nvcc" CACHE STRING "Cuda compiler") set(MXNET_CUDA_ARCH "3.0;3.5;5.0;5.2" CACHE STRING "Cuda architectures") diff --git a/config/distribution/linux_cu80.cmake b/config/distribution/linux_cu80.cmake index ce8e0083bcad..6b98538e6c89 100644 --- a/config/distribution/linux_cu80.cmake +++ b/config/distribution/linux_cu80.cmake @@ -29,6 +29,7 @@ set(USE_LAPACK ON CACHE BOOL "Build with lapack support") set(USE_TVM_OP OFF CACHE BOOL "Enable use of TVM operator build system.") set(USE_SSE ON CACHE BOOL "Build with x86 SSE instruction support") set(USE_F16C OFF CACHE BOOL "Build with x86 F16C instruction support") +set(USE_LIBJPEG_TURBO ON CACHE BOOL "Build with libjpeg-turbo") set(CUDACXX "/usr/local/cuda-8.0/bin/nvcc" CACHE STRING "Cuda compiler") set(MXNET_CUDA_ARCH "3.0;5.0;6.0;6.2" CACHE STRING "Cuda architectures") diff --git a/config/distribution/linux_cu90.cmake b/config/distribution/linux_cu90.cmake index 01097cb882e4..1932a320f615 100644 --- a/config/distribution/linux_cu90.cmake +++ b/config/distribution/linux_cu90.cmake @@ -29,6 +29,7 @@ set(USE_LAPACK ON CACHE BOOL "Build with lapack support") set(USE_TVM_OP OFF CACHE BOOL "Enable use of TVM operator build system.") set(USE_SSE ON CACHE BOOL "Build with x86 SSE instruction support") set(USE_F16C OFF CACHE BOOL "Build with x86 F16C instruction support") +set(USE_LIBJPEG_TURBO ON CACHE BOOL "Build with libjpeg-turbo") set(CUDACXX "/usr/local/cuda-9.0/bin/nvcc" CACHE STRING "Cuda compiler") set(MXNET_CUDA_ARCH "3.0;5.0;6.0;7.0;7.2" CACHE STRING "Cuda architectures") diff --git a/config/distribution/linux_cu91.cmake b/config/distribution/linux_cu91.cmake index f6301fa9f720..36e10a624e40 100644 --- a/config/distribution/linux_cu91.cmake +++ b/config/distribution/linux_cu91.cmake @@ -29,6 +29,7 @@ set(USE_LAPACK ON CACHE BOOL "Build with lapack support") set(USE_TVM_OP OFF CACHE BOOL "Enable use of TVM operator build system.") set(USE_SSE ON CACHE BOOL "Build with x86 SSE instruction support") set(USE_F16C OFF CACHE BOOL "Build with x86 F16C instruction support") +set(USE_LIBJPEG_TURBO ON CACHE BOOL "Build with libjpeg-turbo") set(CUDACXX "/usr/local/cuda-9.1/bin/nvcc" CACHE STRING "Cuda compiler") set(MXNET_CUDA_ARCH "3.0;5.0;6.0;7.0;7.2" CACHE STRING "Cuda architectures") diff --git a/config/distribution/linux_cu92.cmake b/config/distribution/linux_cu92.cmake index 63ab9fce20d8..285daccdabc0 100644 --- a/config/distribution/linux_cu92.cmake +++ b/config/distribution/linux_cu92.cmake @@ -29,6 +29,7 @@ set(USE_LAPACK ON CACHE BOOL "Build with lapack support") set(USE_TVM_OP OFF CACHE BOOL "Enable use of TVM operator build system.") set(USE_SSE ON CACHE BOOL "Build with x86 SSE instruction support") set(USE_F16C OFF CACHE BOOL "Build with x86 F16C instruction support") +set(USE_LIBJPEG_TURBO ON CACHE BOOL "Build with libjpeg-turbo") set(CUDACXX "/usr/local/cuda-9.2/bin/nvcc" CACHE STRING "Cuda compiler") set(MXNET_CUDA_ARCH "3.0;5.0;6.0;7.0;7.2" CACHE STRING "Cuda architectures")