From 6f6c3451c2325e07849f3ac233cf0fba79f61484 Mon Sep 17 00:00:00 2001 From: Kenichi Maehashi Date: Mon, 17 Aug 2020 15:19:53 +0900 Subject: [PATCH] fix to use gcc-6 or later for CuPy v7 + CUDA 11.0 case --- environment.sh | 3 +-- run_test.py | 9 ++++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/environment.sh b/environment.sh index 3094326d..4deb0da5 100644 --- a/environment.sh +++ b/environment.sh @@ -1,7 +1,6 @@ #!/bin/sh -# CuPy v8 requires g++-6 or later to build CUB. -if [ "${CUPY_V8}" != 0 ]; then +if [ "${USE_GCC6_OR_LATER}" != 0 ]; then if [ -f /opt/rh/devtoolset-6/enable ]; then # For CentOS 7, load environment variables for devtoolset-6. . /opt/rh/devtoolset-6/enable diff --git a/run_test.py b/run_test.py index e6730732..16c079f7 100755 --- a/run_test.py +++ b/run_test.py @@ -86,6 +86,9 @@ def main(): numpy_newest_upper_version = '1.20' scipy_min_version = '0.18' scipy_newest_upper_version = '1.5' + + # Required only for CUDA 11 (which bundles CUB) build. + use_gcc6_or_later = False else: if args.test.startswith('chainer-'): print('Skipping chainer test for CuPy>=8') @@ -95,6 +98,9 @@ def main(): scipy_min_version = '1.1' scipy_newest_upper_version = '1.6' + # Always required as CUB is always available. + use_gcc6_or_later = True + ideep_min_version = version.get_ideep_version_from_chainer_docs() if ideep_min_version is None: ideep_req = None # could not determine @@ -335,6 +341,7 @@ def main(): ], } script = './test_cupy.sh' + use_gcc6_or_later = True elif args.test == 'cupy-slow': if not is_cupy_8_or_later: @@ -423,7 +430,7 @@ def main(): volume = [] env = { - 'CUPY_V8': '1' if is_cupy_8_or_later else '0', + 'USE_GCC6_OR_LATER': '1' if use_gcc6_or_later else '0', 'CUDNN': conf['cudnn'], 'IDEEP': 'ideep4py' if use_ideep else 'none', 'CHAINER_BUILD_CHAINERX': '1' if build_chainerx else '0',