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

Commit

Permalink
Merge branch 'master' into cupy-v10-cuda
Browse files Browse the repository at this point in the history
  • Loading branch information
kmaehashi authored May 26, 2021
2 parents 1e96292 + a9338c9 commit 65e9ded
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 5 deletions.
35 changes: 32 additions & 3 deletions docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@
'cutensor1.3.0-cuda102', 'cutensor1.3.0-cuda110', 'cutensor1.3.0-cuda111',
'cutensor1.3.0-cuda112'
]
cusparselt_choices = [
'none',
'cusparselt0.0.1-cuda110', 'cusparselt0.0.1-cuda111', 'cusparselt0.0.1-cuda112',
'cusparselt0.1.0-cuda112',
]


cuda_cudnns = {
'cuda90': ['cudnn7-cuda9', 'cudnn71-cuda9', 'cudnn72-cuda9',
Expand Down Expand Up @@ -119,6 +125,11 @@
'cuda111': ['cutensor1.2.1-cuda111', 'cutensor1.3.0-cuda111'],
'cuda112': ['cutensor1.2.2-cuda112', 'cutensor1.3.0-cuda112'],
}
cuda_cusparselts = {
'cuda110': ['cusparselt0.0.1-cuda110'],
'cuda111': ['cusparselt0.0.1-cuda111'],
'cuda112': ['cusparselt0.0.1-cuda112', 'cusparselt0.1.0-cuda112'],
}


def _check_cuda_combination(lis, dic):
Expand All @@ -131,6 +142,7 @@ def _check_cuda_combination(lis, dic):
_check_cuda_combination(cudnn_choices, cuda_cudnns)
_check_cuda_combination(nccl_choices, cuda_nccls)
_check_cuda_combination(cutensor_choices, cuda_cutensors)
_check_cuda_combination(cusparselt_choices, cuda_cusparselts)
del _check_cuda_combination


Expand All @@ -155,6 +167,7 @@ def get_cuda_libs_choices(target, with_dummy=False):
cudnns = ['none'] + cuda_cudnns[cuda]
nccls = ['none'] + cuda_nccls[cuda]
cutensors = ['none'] + cuda_cutensors.get(cuda, [])
cusparselts = ['none'] + cuda_cusparselts.get(cuda, [])
if cupy_major >= 10:
# cupy v10 requires cuda >= 10.0
if int(cuda[4:]) < 100:
Expand All @@ -179,7 +192,9 @@ def get_cuda_libs_choices(target, with_dummy=False):
for cudnn in cudnns:
for nccl in nccls:
for cutensor in cutensors:
choices.append((cuda, cudnn, nccl, cutensor))
for cusparselt in cusparselts:
choices.append(
(cuda, cudnn, nccl, cutensor, cusparselt))

if target == 'chainer':
choices = [('none', 'none', 'none', 'none')] + choices
Expand Down Expand Up @@ -963,11 +978,25 @@ def get_scipy_choices():
cd /tmp && rm -rf $tmpdir
'''

codes['cusparselt-0.0.1'] = cusparselt_base.format(
codes['cusparselt0.0.1-cuda110'] = cusparselt_base.format(
cusparselt='libcusparse_lt-linux-x86_64-0.0.1.73',
cusparselt_ver='0.0.1',
)

codes['cusparselt0.0.1-cuda111'] = cusparselt_base.format(
cusparselt='libcusparse_lt-linux-x86_64-0.0.1.73',
cusparselt_ver='0.0.1',
)

codes['cusparselt0.0.1-cuda112'] = cusparselt_base.format(
cusparselt='libcusparse_lt-linux-x86_64-0.0.1.73',
cusparselt_ver='0.0.1',
)

codes['cusparselt0.1.0-cuda112'] = cusparselt_base.format(
cusparselt='libcusparse_lt-linux-x86_64-0.1.0.2',
cusparselt_ver='0.1.0',
)

codes['none'] = ''

Expand Down Expand Up @@ -1002,7 +1031,7 @@ def make_dockerfile(conf):
dockerfile += codes[conf['cutensor']]

if conf['cuda'] != 'none':
dockerfile += codes['cusparselt-0.0.1']
dockerfile += codes[conf['cusparselt']]

# Update pip to v20 which is the last version supporting Python 3.5.
dockerfile += '''
Expand Down
1 change: 1 addition & 0 deletions run_cupy_install_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
'cudnn': 'cudnn76-cuda100',
'nccl': 'none',
'cutensor': 'none',
'cusparselt': 'none',
'requires': ['cython==0.29.22', 'numpy==1.17.5'],
}
volume = []
Expand Down
1 change: 1 addition & 0 deletions run_install_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
'cudnn': 'none',
'nccl': 'none',
'cutensor': 'none',
'cusparselt': 'none',
'requires': [],
}
volume = []
Expand Down
2 changes: 2 additions & 0 deletions run_multi_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
parser.add_argument('--cudnn', choices=docker.cudnn_choices, required=True)
parser.add_argument('--nccl', choices=docker.nccl_choices, required=True)
parser.add_argument('--cutensor', choices=docker.cutensor_choices, required=True)
parser.add_argument('--cusparselt', choices=docker.cusparselt_choices, required=True)
parser.add_argument('--ideep', choices=['none', '1.0', '2.0'], required=True)
parser.add_argument('--numpy',
choices=['1.9', '1.10', '1.11', '1.12', '1.13', '1.14', '1.15', '1.16', '1.17'],
Expand Down Expand Up @@ -55,6 +56,7 @@
'cudnn': args.cudnn,
'nccl': args.nccl,
'cutensor': args.cutensor,
'cusparselt': args.cusparselt,
'requires': ['setuptools', 'pip', 'cython==0.29.22'],
}

Expand Down
16 changes: 16 additions & 0 deletions run_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ def main():
'cudnn': 'cudnn75-cuda101',
'nccl': 'nccl2.4-cuda101',
'cutensor': 'none',
'cusparselt': 'none',
'requires': [
# TODO(kmaehashi): Remove setuptools version restrictions
# https://github.com/chainer/chainer-test/issues/565
Expand All @@ -131,6 +132,7 @@ def main():
'cudnn': 'cudnn71-cuda92',
'nccl': 'nccl2.2-cuda92',
'cutensor': 'none',
'cusparselt': 'none',
'requires': [
# TODO(kmaehashi): Remove setuptools version restrictions
# https://github.com/pypa/setuptools/issues/2352
Expand All @@ -151,6 +153,7 @@ def main():
'cudnn': 'cudnn75-cuda101',
'nccl': 'nccl2.4-cuda101',
'cutensor': 'none',
'cusparselt': 'none',
'requires': [
# Use '>=0.0.dev0' to install the latest pre-release version
# available on PyPI.
Expand Down Expand Up @@ -178,6 +181,7 @@ def main():
'cudnn': 'cudnn6-cuda8',
'nccl': 'nccl1.3',
'cutensor': 'none',
'cusparselt': 'none',
'requires': [
# TODO(kmaehashi): Remove setuptools version restrictions
# https://github.com/pypa/setuptools/issues/2352
Expand All @@ -197,6 +201,7 @@ def main():
'cudnn': 'cudnn73-cuda9',
'nccl': 'nccl2.2-cuda9',
'cutensor': 'none',
'cusparselt': 'none',
'requires': [
# TODO(kmaehashi): Remove setuptools version restrictions
# https://github.com/pypa/setuptools/issues/2352
Expand All @@ -213,6 +218,7 @@ def main():
'cudnn': 'cudnn72-cuda92',
'nccl': 'none',
'cutensor': 'none',
'cusparselt': 'none',
'requires': [
# TODO(kmaehashi): Remove setuptools version restrictions
# https://github.com/pypa/setuptools/issues/2352
Expand All @@ -231,6 +237,7 @@ def main():
'cudnn': 'cudnn6-cuda8',
'nccl': 'none',
'cutensor': 'none',
'cusparselt': 'none',
'requires': [
# TODO(kmaehashi): Remove setuptools version restrictions
# https://github.com/pypa/setuptools/issues/2352
Expand All @@ -251,6 +258,7 @@ def main():
'cudnn': 'cudnn76-cuda100',
'nccl': 'nccl2.4-cuda100',
'cutensor': 'none',
'cusparselt': 'none',
'requires': [
'setuptools<42', 'pip', 'cython==0.29.22',
'numpy==1.20.*', 'scipy==1.6.*',
Expand All @@ -265,6 +273,7 @@ def main():
'cudnn': 'cudnn76-cuda102',
'nccl': 'nccl2.5-cuda102',
'cutensor': 'cutensor1.3.0-cuda102',
'cusparselt': 'none',
'requires': [
# TODO(kmaehashi): Remove setuptools version restrictions
# https://github.com/chainer/chainer-test/issues/565
Expand All @@ -281,6 +290,7 @@ def main():
'cudnn': 'cudnn76-cuda100',
'nccl': 'nccl2.4-cuda100',
'cutensor': 'none',
'cusparselt': 'none',
'requires': [
# TODO(kmaehashi): Remove setuptools version restrictions
# https://github.com/chainer/chainer-test/issues/565
Expand All @@ -304,6 +314,7 @@ def main():
'cudnn': 'cudnn81-cuda112',
'nccl': 'nccl2.8-cuda112',
'cutensor': 'none',
'cusparselt': 'none',
'requires': [
# TODO(kmaehashi): Remove setuptools version restrictions
# https://github.com/pypa/setuptools/issues/2352
Expand All @@ -328,6 +339,7 @@ def main():
'cudnn': 'cudnn82-cuda112',
'nccl': 'nccl2.8-cuda112',
'cutensor': 'none',
'cusparselt': 'cusparselt0.1.0-cuda112',
'requires': [
# TODO(kmaehashi): Remove setuptools version restrictions
# https://github.com/pypa/setuptools/issues/2352
Expand All @@ -352,6 +364,7 @@ def main():
'cudnn': 'cudnn81-cuda112',
'nccl': 'none',
'cutensor': 'none',
'cusparselt': 'none',
'requires': [
# TODO(kmaehashi): Remove setuptools version restrictions
# https://github.com/pypa/setuptools/issues/2352
Expand All @@ -369,6 +382,7 @@ def main():
'cudnn': 'cudnn76-cuda92',
'nccl': 'nccl2.2-cuda92',
'cutensor': 'none',
'cusparselt': 'none',
'requires': [
# TODO(kmaehashi): Remove setuptools version restrictions
# https://github.com/pypa/setuptools/issues/2352
Expand All @@ -383,6 +397,7 @@ def main():
'cudnn': 'cudnn76-cuda102',
'nccl': 'nccl2.5-cuda102',
'cutensor': 'cutensor1.2.0-cuda102',
'cusparselt': 'none',
'requires': [
# TODO(kmaehashi): Remove setuptools version restrictions
# https://github.com/pypa/setuptools/issues/2352
Expand All @@ -406,6 +421,7 @@ def main():
'cudnn': 'cudnn76-cuda100',
'nccl': 'nccl2.4-cuda100',
'cutensor': 'none',
'cusparselt': 'none',
'requires': [
# TODO(kmaehashi): Remove setuptools version restrictions
# https://github.com/pypa/setuptools/issues/2352
Expand Down
4 changes: 2 additions & 2 deletions shuffle.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def _is_shuffle_params_valid(ret):
if 'centos6' in base and ret.get('protobuf') == 'cpp-3':
return False, 'protobuf cpp-3 not supported on centos6'

cuda, cudnn, nccl, cutensor = ret['cuda_libs']
cuda, cudnn, nccl, cutensor, cusparselt = ret['cuda_libs']

if 'centos6' in base and nccl != 'none':
# https://docs.nvidia.com/deeplearning/sdk/nccl-install-guide/index.html#rhel_centos
Expand Down Expand Up @@ -245,7 +245,7 @@ def make_conf(params):
if 'base' in params:
conf['base'] = params['base']
if 'cuda_libs' in params:
conf['cuda'], conf['cudnn'], conf['nccl'], conf['cutensor'] = params['cuda_libs']
conf['cuda'], conf['cudnn'], conf['nccl'], conf['cutensor'], conf['cusparselt'] = params['cuda_libs']

append_require(params, conf, 'setuptools')
append_require(params, conf, 'pip')
Expand Down

0 comments on commit 65e9ded

Please sign in to comment.