From 0481230723a77e8339126488d0b20e47196e4e48 Mon Sep 17 00:00:00 2001 From: Pedro Larroy Date: Tue, 11 Dec 2018 15:21:00 +0100 Subject: [PATCH] Add CPU test coverage and refine cmake builds --- 3rdparty/mshadow | 2 +- ci/docker/runtime_functions.sh | 16 ++++++++++------ ci/jenkins/Jenkins_steps.groovy | 20 +++++++++++++++++--- ci/jenkins/Jenkinsfile_unix_cpu | 6 +----- ci/jenkins/Jenkinsfile_unix_gpu | 4 ++++ 5 files changed, 33 insertions(+), 15 deletions(-) diff --git a/3rdparty/mshadow b/3rdparty/mshadow index 6dc04f7c729c..696803bd7723 160000 --- a/3rdparty/mshadow +++ b/3rdparty/mshadow @@ -1 +1 @@ -Subproject commit 6dc04f7c729cd5c6c6210d5d4d2026a26ce0bfbf +Subproject commit 696803bd7723ade8230af878460d96c68a550fbc diff --git a/ci/docker/runtime_functions.sh b/ci/docker/runtime_functions.sh index a84ee2c53af1..791c2bd0896a 100755 --- a/ci/docker/runtime_functions.sh +++ b/ci/docker/runtime_functions.sh @@ -392,6 +392,7 @@ build_ubuntu_cpu_cmake_debug() { -DUSE_MKL_IF_AVAILABLE=OFF \ -DUSE_OPENMP=OFF \ -DUSE_OPENCV=ON \ + -DUSE_SIGNAL_HANDLER=ON \ -DCMAKE_BUILD_TYPE=Debug \ -G Ninja \ /work/mxnet @@ -696,6 +697,7 @@ build_ubuntu_gpu_cmake_mkldnn() { -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_C_COMPILER_LAUNCHER=ccache \ -DCMAKE_CUDA_COMPILER_LAUNCHER=ccache \ + -DUSE_SIGNAL_HANDLER=ON \ -DENABLE_TESTCOVERAGE=ON \ -DUSE_CUDA=1 \ -DUSE_CUDNN=1 \ @@ -720,12 +722,14 @@ build_ubuntu_gpu_cmake() { -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_C_COMPILER_LAUNCHER=ccache \ -DCMAKE_CUDA_COMPILER_LAUNCHER=ccache \ + -DUSE_SIGNAL_HANDLER=ON \ -DENABLE_TESTCOVERAGE=ON \ - -DUSE_CUDA=1 \ - -DUSE_CUDNN=1 \ - -DUSE_MKLML_MKL=0 \ - -DUSE_MKLDNN=0 \ - -DUSE_DIST_KVSTORE=1 \ + -DUSE_CUDA=ON \ + -DUSE_CUDNN=ON \ + -DUSE_MKL_IF_AVAILABLE=OFF \ + -DUSE_MKLML_MKL=OFF \ + -DUSE_MKLDNN=OFF \ + -DUSE_DIST_KVSTORE=ON \ -DCMAKE_BUILD_TYPE=Release \ -DCUDA_ARCH_NAME=Manual \ -DCUDA_ARCH_BIN=$CI_CMAKE_CUDA_ARCH_BIN \ @@ -861,7 +865,7 @@ unittest_ubuntu_cpugpu_perl() { ./perl-package/test.sh } -unittest_ubuntu_gpu_cpp() { +unittest_cpp() { set -ex build/tests/mxnet_unit_tests } diff --git a/ci/jenkins/Jenkins_steps.groovy b/ci/jenkins/Jenkins_steps.groovy index 3ca1f2ee0339..57454b9ee44c 100644 --- a/ci/jenkins/Jenkins_steps.groovy +++ b/ci/jenkins/Jenkins_steps.groovy @@ -108,7 +108,7 @@ def compile_unix_cpu_openblas() { } def compile_unix_openblas_debug_cpu() { - return ['CPU: Openblas, debug': { + return ['CPU: Openblas, cmake, debug': { node(NODE_LINUX_CPU) { ws('workspace/build-cpu-openblas') { timeout(time: max_time, unit: 'MINUTES') { @@ -882,7 +882,7 @@ def test_unix_cpp_gpu() { ws('workspace/ut-cpp-gpu') { timeout(time: max_time, unit: 'MINUTES') { utils.unpack_and_init('cmake_gpu', mx_cmake_lib, true) - utils.docker_run('ubuntu_gpu', 'unittest_ubuntu_gpu_cpp', true) + utils.docker_run('ubuntu_gpu', 'unittest_cpp', true) utils.publish_test_coverage() } } @@ -896,7 +896,21 @@ def test_unix_cpp_mkldnn_gpu() { ws('workspace/ut-cpp-mkldnn-gpu') { timeout(time: max_time, unit: 'MINUTES') { utils.unpack_and_init('cmake_mkldnn_gpu', mx_cmake_mkldnn_lib, true) - utils.docker_run('ubuntu_gpu', 'unittest_ubuntu_gpu_cpp', true) + utils.docker_run('ubuntu_gpu', 'unittest_cpp', true) + utils.publish_test_coverage() + } + } + } + }] +} + +def test_unix_cpp_cpu() { + return ['Cpp: CPU': { + node(NODE_LINUX_CPU) { + ws('workspace/ut-cpp-cpu') { + timeout(time: max_time, unit: 'MINUTES') { + utils.unpack_and_init('cpu_debug', mx_cmake_lib_debug, true) + utils.docker_run('ubuntu_cpu', 'unittest_cpp', false) utils.publish_test_coverage() } } diff --git a/ci/jenkins/Jenkinsfile_unix_cpu b/ci/jenkins/Jenkinsfile_unix_cpu index e581bcf65dc5..959793a89df3 100644 --- a/ci/jenkins/Jenkinsfile_unix_cpu +++ b/ci/jenkins/Jenkinsfile_unix_cpu @@ -54,12 +54,8 @@ core_logic: { custom_steps.test_unix_r_cpu(), custom_steps.test_unix_julia_cpu(), custom_steps.test_unix_onnx_cpu(), - - /* Disabled due to master build failure: - * http://jenkins.mxnet-ci.amazon-ml.com/blue/organizations/jenkins/incubator-mxnet/detail/master/1221/pipeline/ - * /~https://github.com/apache/incubator-mxnet/issues/11801 + custom_steps.test_unix_cpp_cpu(), custom_steps.test_unix_distributed_kvstore_cpu() - */ ]) } , diff --git a/ci/jenkins/Jenkinsfile_unix_gpu b/ci/jenkins/Jenkinsfile_unix_gpu index cf92836e96e4..982ffc00113a 100644 --- a/ci/jenkins/Jenkinsfile_unix_gpu +++ b/ci/jenkins/Jenkinsfile_unix_gpu @@ -57,7 +57,11 @@ core_logic: { custom_steps.test_unix_python3_integration_gpu(), custom_steps.test_unix_cpp_package_gpu(), custom_steps.test_unix_scala_gpu(), + /* Disabled due to master build failure: + * http://jenkins.mxnet-ci.amazon-ml.com/blue/organizations/jenkins/incubator-mxnet/detail/master/1221/pipeline/ + * /~https://github.com/apache/incubator-mxnet/issues/11801 custom_steps.test_unix_distributed_kvstore_gpu() + */ // Disabled due to: /~https://github.com/apache/incubator-mxnet/issues/11407 //custom_steps.test_unix_caffe_gpu()