diff --git a/ci/docker/runtime_functions.sh b/ci/docker/runtime_functions.sh index b69673923440..9972b66a4a74 100755 --- a/ci/docker/runtime_functions.sh +++ b/ci/docker/runtime_functions.sh @@ -811,11 +811,32 @@ build_ubuntu_gpu_cuda101_cudnn7() { CUDA_ARCH="$CI_CUDA_COMPUTE_CAPABILITIES" \ USE_SIGNAL_HANDLER=1 \ -j$(nproc) + make cython PYTHON=python2 + make cython PYTHON=python3 +} + +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 -j$(nproc) make cython PYTHON=python2 make cython PYTHON=python3 } + build_ubuntu_gpu_cuda101_cudnn7_no_tvm_op() { set -ex build_ccache_wrappers @@ -1355,7 +1376,10 @@ integrationtest_ubuntu_cpu_asan() { integrationtest_ubuntu_gpu_cpp_package() { set -ex cpp-package/tests/ci_test.sh - export PYTHONPATH=./python/ +} + +integrationtest_ubuntu_gpu_capi_cpp_package() { + set -ex python3 -c "import mxnet as mx; mx.test_utils.download_model(\"imagenet1k-resnet-18\"); mx.test_utils.download_model(\"imagenet1k-resnet-152\"); mx.test_utils.download_model(\"imagenet1k-resnet-50\");" build/tests/mxnet_unit_tests --gtest_filter="ThreadSafety.*" build/tests/mxnet_unit_tests --gtest_filter="ThreadSafety.*" --thread-safety-with-cpu diff --git a/ci/jenkins/Jenkins_steps.groovy b/ci/jenkins/Jenkins_steps.groovy index b0b57da93913..eff29ba49599 100644 --- a/ci/jenkins/Jenkins_steps.groovy +++ b/ci/jenkins/Jenkins_steps.groovy @@ -38,7 +38,8 @@ mx_cmake_lib_debug = 'build/libmxnet.so, build/libmxnet.a, build/3rdparty/tvm/li mx_cmake_mkldnn_lib = 'build/libmxnet.so, build/libmxnet.a, build/3rdparty/tvm/libtvm_runtime.so, build/libtvmop.so, build/tvmop.conf, build/3rdparty/dmlc-core/libdmlc.a, build/tests/mxnet_unit_tests, build/3rdparty/openmp/runtime/src/libomp.so, build/3rdparty/mkldnn/src/libmkldnn.so.0' mx_mkldnn_lib = 'lib/libmxnet.so, lib/libmxnet.a, lib/libtvm_runtime.so, lib/libtvmop.so, lib/tvmop.conf, libsample_lib.so, lib/libiomp5.so, lib/libmkldnn.so.0, lib/libmklml_intel.so, 3rdparty/dmlc-core/libdmlc.a, 3rdparty/tvm/nnvm/lib/libnnvm.a' mx_tensorrt_lib = 'build/libmxnet.so, build/3rdparty/tvm/libtvm_runtime.so, build/libtvmop.so, build/tvmop.conf, lib/libnvonnxparser_runtime.so.0, lib/libnvonnxparser.so.0, lib/libonnx_proto.so, lib/libonnx.so' -mx_lib_cpp_examples = 'lib/libmxnet.so, lib/libmxnet.a, lib/libtvm_runtime.so, lib/libtvmop.so, lib/tvmop.conf, libsample_lib.so, 3rdparty/dmlc-core/libdmlc.a, 3rdparty/tvm/nnvm/lib/libnnvm.a, 3rdparty/ps-lite/build/libps.a, deps/lib/libprotobuf-lite.a, deps/lib/libzmq.a, build/cpp-package/example/*, python/mxnet/_cy2/*.so, python/mxnet/_cy3/*.so, build/tests/mxnet_unit_tests' +mx_lib_cpp_examples = 'lib/libmxnet.so, lib/libmxnet.a, lib/libtvm_runtime.so, lib/libtvmop.so, lib/tvmop.conf, libsample_lib.so, 3rdparty/dmlc-core/libdmlc.a, 3rdparty/tvm/nnvm/lib/libnnvm.a, 3rdparty/ps-lite/build/libps.a, deps/lib/libprotobuf-lite.a, deps/lib/libzmq.a, build/cpp-package/example/*, python/mxnet/_cy2/*.so, python/mxnet/_cy3/*.so' +mx_lib_cpp_capi = 'lib/libmxnet.so, lib/libmxnet.a, lib/libtvm_runtime.so, lib/libtvmop.so, lib/tvmop.conf, libsample_lib.so, lib/libmkldnn.so.0, lib/libmklml_intel.so, 3rdparty/dmlc-core/libdmlc.a, 3rdparty/tvm/nnvm/lib/libnnvm.a, 3rdparty/ps-lite/build/libps.a, deps/lib/libprotobuf-lite.a, deps/lib/libzmq.a, build/cpp-package/example/*, python/mxnet/_cy2/*.so, python/mxnet/_cy3/*.so, build/tests/mxnet_unit_tests' mx_lib_cpp_examples_no_tvm_op = 'lib/libmxnet.so, lib/libmxnet.a, libsample_lib.so, 3rdparty/dmlc-core/libdmlc.a, 3rdparty/tvm/nnvm/lib/libnnvm.a, 3rdparty/ps-lite/build/libps.a, deps/lib/libprotobuf-lite.a, deps/lib/libzmq.a, build/cpp-package/example/*, python/mxnet/_cy2/*.so, python/mxnet/_cy3/*.so' mx_lib_cpp_examples_cpu = 'build/libmxnet.so, build/3rdparty/tvm/libtvm_runtime.so, build/libtvmop.so, build/tvmop.conf, build/cpp-package/example/*' @@ -261,6 +262,20 @@ def compile_unix_full_gpu() { }] } +def compile_unix_full_gpu_mkldnn_cpp_test() { + return ['GPU: CUDA10.1+cuDNN7+MKLDNN+CPPTEST': { + node(NODE_LINUX_CPU) { + ws('workspace/build-gpu-mkldnn-cpp') { + timeout(time: max_time, unit: 'MINUTES') { + utils.init_git() + utils.docker_run('ubuntu_build_cuda', 'build_ubuntu_gpu_cuda101_cudnn7_mkldnn_cpp_test', false) + utils.pack_lib('gpu_mkldnn_cpp_test', mx_lib_cpp_capi) + } + } + } + }] +} + def compile_unix_full_gpu_no_tvm_op() { return ['GPU: CUDA10.1+cuDNN7 TVM_OP OFF': { node(NODE_LINUX_CPU) { @@ -1010,6 +1025,20 @@ def test_unix_cpp_package_gpu() { }] } +def test_unix_capi_cpp_package() { + return ['capi-cpp-package GPU:' { + node(NODE_LINUX_GPU) { + ws('workspace/it-capi-cpp-package') { + timeout(time: max_time, unit: 'MINUTES') { + utils.unpack_and_init('gpu_mkldnn_cpp_test', mx_lib_cpp_capi) + utils.docker_run('ubuntu_gpu_cu101', 'integrationtest_ubuntu_gpu_capi_cpp_package', true) + utils.publish_test_coverage() + } + } + } + }] +} + def test_unix_scala_cpu() { return ['Scala: CPU': { node(NODE_LINUX_CPU) { diff --git a/ci/jenkins/Jenkinsfile_unix_gpu b/ci/jenkins/Jenkinsfile_unix_gpu index 18e27198c330..0172865f0e19 100644 --- a/ci/jenkins/Jenkinsfile_unix_gpu +++ b/ci/jenkins/Jenkinsfile_unix_gpu @@ -43,6 +43,7 @@ core_logic: { custom_steps.compile_unix_int64_gpu(), custom_steps.compile_unix_full_gpu_no_tvm_op(), custom_steps.compile_unix_cmake_gpu_no_tvm_op(), + custom_steps.compile_unix_full_gpu_mkldnn_cpp_test() ]) utils.parallel_stage('Tests', [ @@ -64,6 +65,7 @@ core_logic: { custom_steps.test_unix_distributed_kvstore_gpu(), custom_steps.test_static_python_gpu(), custom_steps.test_unix_python3_gpu_no_tvm_op(), + custom_steps.test_unix_capi_cpp_package(), // Disabled due to: https://github.com/apache/incubator-mxnet/issues/11407 //custom_steps.test_unix_caffe_gpu()