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

Commit

Permalink
fix to use gcc-6 or later for CuPy v7 + CUDA 11.0 case
Browse files Browse the repository at this point in the history
  • Loading branch information
kmaehashi committed Aug 17, 2020
1 parent ddf253b commit 6f6c345
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 1 addition & 2 deletions environment.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
9 changes: 8 additions & 1 deletion run_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit 6f6c345

Please sign in to comment.