Skip to content

Commit 055f527

Browse files
authored
[build] Use conda cmake in two CI builds (pytorch#8864)
* use conda cmake in pytorch-linux-xenial-cuda8-cudnn6-py2 and pytorch-linux-xenial-cuda9-cudnn6-py3 * update test_expect * add exit 1 * check cmake 3.5 * bump expect driver version * add back space
1 parent 5575735 commit 055f527

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

.jenkins/pytorch/common.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,23 @@ if [[ "$BUILD_ENVIRONMENT" == *pytorch-linux-xenial-cuda9-cudnn7-py3 ]] || \
118118
else
119119
BUILD_TEST_LIBTORCH=0
120120
fi
121+
122+
# Use conda cmake in some CI build. Conda cmake will be newer than our supported
123+
# min version 3.5, so we only do it in two builds that we know should use conda.
124+
if [[ "$BUILD_ENVIRONMENT" == *pytorch-linux-xenial-cuda* ]]; then
125+
if [[ "$BUILD_ENVIRONMENT" == *cuda8-cudnn6-py2* ]] || \
126+
[[ "$BUILD_ENVIRONMENT" == *cuda9-cudnn7-py3* ]]; then
127+
if ! which conda; then
128+
echo "Expected ${BUILD_ENVIRONMENT} to use conda, but 'which conda' returns empty"
129+
exit 1
130+
else
131+
conda install -q -y cmake
132+
fi
133+
else
134+
if ! cmake --version | grep 'cmake version 3\.5'; then
135+
echo "Expected ${BUILD_ENVIRONMENT} to have cmake version 3.5.* (min support version), but 'cmake --version' returns:"
136+
cmake --version
137+
exit 1
138+
fi
139+
fi
140+
fi

test/expect/TestCollectEnv.test_pytorch_linux_xenial_cuda9_cudnn7_py3.expect

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ GPU models and configuration:
1313
GPU 0: Tesla M60
1414
GPU 1: Tesla M60
1515

16-
Nvidia driver version: 390.X
16+
Nvidia driver version: 396.X
1717
cuDNN version: Probably one of the following:
1818
/usr/lib/x86_64-linux-gnu/libcudnn.so.7.1.4
1919
/usr/lib/x86_64-linux-gnu/libcudnn_static_v7.a

test/test_utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,6 @@ def test_smoke(self):
673673
self.assertTrue(info_output.count('\n') >= 17)
674674

675675
@unittest.skipIf('BUILD_ENVIRONMENT' not in os.environ.keys(), 'CI-only test')
676-
@unittest.skip('temporarily skip to change cmake version in CI')
677676
def test_expect(self):
678677
info_output = get_pretty_env_info()
679678

0 commit comments

Comments
 (0)