Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Add unit test stage for mxnet cpu in debug mode #11974

Merged
merged 1 commit into from
Aug 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ mx_lib = 'lib/libmxnet.so, lib/libmxnet.a, 3rdparty/dmlc-core/libdmlc.a, 3rdpart
mx_dist_lib = 'lib/libmxnet.so, lib/libmxnet.a, 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'
// mxnet cmake libraries, in cmake builds we do not produce a libnvvm static library by default.
mx_cmake_lib = 'build/libmxnet.so, build/libmxnet.a, build/3rdparty/dmlc-core/libdmlc.a, build/tests/mxnet_unit_tests, build/3rdparty/openmp/runtime/src/libomp.so'
// mxnet cmake libraries, in cmake builds we do not produce a libnvvm static library by default.
mx_cmake_lib_debug = 'build/libmxnet.so, build/libmxnet.a, build/3rdparty/dmlc-core/libdmlc.a, build/tests/mxnet_unit_tests'
mx_cmake_mkldnn_lib = 'build/libmxnet.so, build/libmxnet.a, 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/libiomp5.so, lib/libmkldnn.so.0, lib/libmklml_intel.so, 3rdparty/dmlc-core/libdmlc.a, 3rdparty/tvm/nnvm/lib/libnnvm.a'
// timeout in minutes
Expand Down Expand Up @@ -233,6 +235,17 @@ try {
}
}
},
'CPU: Openblas, debug': {
node('mxnetlinux-cpu') {
ws('workspace/build-cpu-openblas') {
timeout(time: max_time, unit: 'MINUTES') {
init_git()
docker_run('ubuntu_cpu', 'build_ubuntu_cpu_cmake_debug', false)
pack_lib('cpu_debug', mx_cmake_lib_debug)
}
}
}
},
'CPU: Clang 3.9': {
node('mxnetlinux-cpu') {
ws('workspace/build-cpu-clang39') {
Expand Down Expand Up @@ -574,6 +587,20 @@ try {
}
}
},
'Python3: CPU debug': {
node('mxnetlinux-cpu') {
ws('workspace/ut-python3-cpu-debug') {
try {
init_git()
unpack_lib('cpu_debug', mx_cmake_lib_debug)
python3_ut('ubuntu_cpu')
} finally {
collect_test_results_unix('nosetests_unittest.xml', 'nosetests_python3_cpu_debug_unittest.xml')
collect_test_results_unix('nosetests_quantization.xml', 'nosetests_python3_cpu_debug_quantization.xml')
}
}
}
},
'Python2: GPU': {
node('mxnetlinux-gpu') {
ws('workspace/ut-python2-gpu') {
Expand Down
19 changes: 19 additions & 0 deletions ci/docker/runtime_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,25 @@ build_ubuntu_cpu_openblas() {
report_ccache_usage
}

build_ubuntu_cpu_cmake_debug() {
set -ex
pushd .
cd /work/build
cmake \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DUSE_CUDA=OFF \
-DUSE_MKL_IF_AVAILABLE=OFF \
-DUSE_OPENMP=OFF \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No openmp?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we test without? They were some linking issues before.

Copy link
Contributor

@marcoabreu marcoabreu Aug 2, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, for compilation-only that's definitely a good idea. For running the tests, do you think it makes a big difference (that needs to be validated) between enabled and disabled OpenMP?

I'll leave it up to you

-DUSE_OPENCV=ON \
-DCMAKE_BUILD_TYPE=Debug \
-G Ninja \
/work/mxnet

ninja -v
popd
}

build_ubuntu_cpu_clang39() {
set -ex

Expand Down