From c5383f788c2f2eec21ff97261b2ac0f5cc902684 Mon Sep 17 00:00:00 2001 From: perdasilva Date: Thu, 12 Sep 2019 23:00:46 +0200 Subject: [PATCH] CD Fixes (#16127) * Ignore load lib test in CD jobs * Removes cu80 and adds cu101 support to CD builds * Disable cython in CD python tests * Updates CD documentation to reflect variant changes --- cd/Jenkinsfile_cd_pipeline | 2 +- cd/README.md | 4 ++-- ci/docker/runtime_functions.sh | 2 ++ python/mxnet/test_utils.py | 5 +++++ tests/python/unittest/test_library_loading.py | 3 ++- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/cd/Jenkinsfile_cd_pipeline b/cd/Jenkinsfile_cd_pipeline index 85b06cb09bb0..d7872204fcb7 100644 --- a/cd/Jenkinsfile_cd_pipeline +++ b/cd/Jenkinsfile_cd_pipeline @@ -30,7 +30,7 @@ pipeline { parameters { // Release parameters - string(defaultValue: "cpu,mkl,cu80,cu80mkl,cu90,cu90mkl,cu92,cu92mkl,cu100,cu100mkl", description: "Comma separated list of variants", name: "MXNET_VARIANTS") + string(defaultValue: "cpu,mkl,cu90,cu90mkl,cu92,cu92mkl,cu100,cu100mkl,cu101,cu101mkl", description: "Comma separated list of variants", name: "MXNET_VARIANTS") booleanParam(defaultValue: false, description: 'Whether this is a release build or not', name: "RELEASE_BUILD") } diff --git a/cd/README.md b/cd/README.md index fd978c1d819e..a66fd0ce5533 100644 --- a/cd/README.md +++ b/cd/README.md @@ -31,14 +31,14 @@ Currently, 10 variants are supported: * *cpu*: CPU * *mkl*: CPU w/ MKL -* *cu80*: CUDA 8.0 -* *cu80mkl*: CUDA 8.0 w/ MKL-DNN * *cu90*: CUDA 9.0 * *cu90mkl*: CUDA 9.0 w/ MKL-DNN * *cu92*: CUDA 9.2 * *cu92mkl*: CUDA 9.2 w/ MKL-DNN * *cu100*: CUDA 10 * *cu100mkl*: CUDA 10 w/ MKL-DNN +* *cu101*: CUDA 10 +* *cu101mkl*: CUDA 10.1 w/ MKL-DNN *For more on variants, see [here](https://github.com/apache/incubator-mxnet/issues/8671)* diff --git a/ci/docker/runtime_functions.sh b/ci/docker/runtime_functions.sh index 689d525a5cce..67cc98c73620 100755 --- a/ci/docker/runtime_functions.sh +++ b/ci/docker/runtime_functions.sh @@ -834,6 +834,8 @@ cd_unittest_ubuntu() { export PYTHONPATH=./python/ export MXNET_MKLDNN_DEBUG=1 # Ignored if not present export MXNET_STORAGE_FALLBACK_LOG_VERBOSE=0 + export MXNET_ENABLE_CYTHON=0 + export CD_JOB=1 # signal this is a CD run so any unecessary tests can be skipped local mxnet_variant=${1:?"This function requires a mxnet variant as the first argument"} local python_cmd=${2:?"This function requires a python command as the first argument"} diff --git a/python/mxnet/test_utils.py b/python/mxnet/test_utils.py index 4533729e2c15..abdf57039c3a 100644 --- a/python/mxnet/test_utils.py +++ b/python/mxnet/test_utils.py @@ -2220,3 +2220,8 @@ def collapse_sum_like(a, shape): assert s == 1 axes.append(i+ndim_diff) return np.sum(a, axis=tuple(axes)).reshape(shape) + + +def is_cd_run(): + """Checks if the test is running as part of a Continuous Delivery run""" + return os.environ.get("CD_JOB", 0) == "1" diff --git a/tests/python/unittest/test_library_loading.py b/tests/python/unittest/test_library_loading.py index 596d124c89d6..29b99dacdbe1 100644 --- a/tests/python/unittest/test_library_loading.py +++ b/tests/python/unittest/test_library_loading.py @@ -22,12 +22,13 @@ import unittest import mxnet as mx from mxnet.base import MXNetError -from mxnet.test_utils import download +from mxnet.test_utils import download, is_cd_run def check_platform(): return platform.machine() not in ['x86_64', 'AMD64'] @unittest.skipIf(check_platform(), "not all machine types supported") +@unittest.skipIf(is_cd_run(), "continuous delivery run - ignoring test") def test_library_loading(): if (os.name=='posix'): lib = 'libsample_lib.so'