Skip to content

Commit 23b37c1

Browse files
committed
Merge branch 'v22.05' into 'main'
Bring up for cuQuantum v22.05 See merge request cuda-hpc-libraries/cuquantum-sdk/cuquantum-public!10
2 parents 0f00494 + e7b79d1 commit 23b37c1

File tree

6 files changed

+33
-13
lines changed

6 files changed

+33
-13
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2021-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
1+
Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22

33
BSD-3-Clause
44

python/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Build-time dependencies of the cuQuantum Python package and some versions that
1212
are known to work are as follows:
1313

1414
* CUDA Toolkit 11.x
15-
* cuQuantum 22.03
15+
* cuQuantum 22.03+
1616
* cuTENSOR 1.5.0+
1717
* Cython - e.g. 0.29.21
1818
* [packaging](https://packaging.pypa.io/en/latest/)
@@ -62,7 +62,7 @@ Runtime dependencies of the cuQuantum Python package include:
6262
* An NVIDIA GPU with compute capability 7.0+
6363
* Driver: Linux (450.80.02+)
6464
* CUDA Toolkit 11.x
65-
* cuQuantum 22.03
65+
* cuQuantum 22.03+
6666
* cuTENSOR 1.5.0+
6767
* NumPy v1.17+
6868
* CuPy v9.5.0+ (see [installation guide](https://docs.cupy.dev/en/stable/install.html))

python/cuquantum/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# Note: cuQuantum Python follows the cuQuantum SDK version, which is now
66
# switched to YY.MM and is different from individual libraries' (semantic)
77
# versioning scheme.
8-
__version__ = '22.03.0' # the last digit is for cuQuantum Python only
8+
__version__ = '22.05.0' # the last digit is for cuQuantum Python only

python/setup.py

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@
2222
# 22.3 by setuptools, so we must follow the same practice in the constraints;
2323
# also, we don't need the Python patch number here
2424
cuqnt_py_ver = Version(__version__)
25-
cuqnt_ver_major_minor = f"{cuqnt_py_ver.major}.{cuqnt_py_ver.minor}"
25+
# WAR: restore this line when releasing 22.06, for now we pin at 22.03 to
26+
# enable binary compatibility
27+
#cuqnt_ver_major_minor = f"{cuqnt_py_ver.major}.{cuqnt_py_ver.minor}"
28+
cuqnt_ver_major_minor = '22.3'
2629

2730

2831
# search order:
@@ -94,17 +97,20 @@
9497
]
9598
install_requires = [
9699
'numpy',
97-
# 'cupy', # <-- can't be listed here as on PyPI this is the name for source build, not for wheel
98-
# 'torch', # <-- PyTorch is optional; also, it does not live on PyPI...
100+
# 'cupy', # TODO: use "cupy-wheel" once it's stablized, see https://github.com/cupy/cupy/issues/6688
101+
# 'torch', # <-- PyTorch is optional; also, the PyPI version does not support GPU...
99102
'typing_extensions',
100103
]
101104
ignore_cuquantum_dep = bool(os.environ.get('CUQUANTUM_IGNORE_SOLVER', False))
102105
if not ignore_cuquantum_dep:
103106
assert using_cuquantum_wheel # if this raises, the env is corrupted
104-
# cuTENSOR version is constrained in the cuquantum package, so we don't
105-
# need to list it
106-
setup_requires.append(f'cuquantum=={cuqnt_ver_major_minor}.*')
107-
install_requires.append(f'cuquantum=={cuqnt_ver_major_minor}.*')
107+
# - cuTENSOR version is constrained in the cuquantum package, so we don't
108+
# need to list it
109+
# - here we assume no API breaking across releases, if there's any we must
110+
# bump the lowest supported version; we can't cap the highest supported
111+
# version as we don't use semantic versioning, unfortunately...
112+
setup_requires.append(f'cuquantum>={cuqnt_ver_major_minor}.*')
113+
install_requires.append(f'cuquantum>={cuqnt_ver_major_minor}.*')
108114

109115

110116
def check_cuda_version():
@@ -225,7 +231,7 @@ def prepare_libs_and_rpaths():
225231
"Environment :: GPU :: NVIDIA CUDA :: 11.3",
226232
"Environment :: GPU :: NVIDIA CUDA :: 11.4",
227233
"Environment :: GPU :: NVIDIA CUDA :: 11.5",
228-
#"Environment :: GPU :: NVIDIA CUDA :: 11.6", # PyPI has not added it yet
234+
"Environment :: GPU :: NVIDIA CUDA :: 11.6",
229235
],
230236
ext_modules=cythonize([
231237
custatevec,

python/tests/cuquantum_tests/custatevec_tests/test_custatevec.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import copy
66
import os
7+
import sys
78
import tempfile
89

910
try:
@@ -29,6 +30,11 @@
2930
#
3031
###################################################################
3132

33+
if cffi:
34+
# if the Python binding is not installed in the editable mode (pip install
35+
# -e .), the cffi tests would fail as the modules cannot be imported
36+
sys.path.append(os.getcwd())
37+
3238
dtype_to_data_type = {
3339
numpy.dtype(numpy.complex64): cudaDataType.CUDA_C_32F,
3440
numpy.dtype(numpy.complex128): cudaDataType.CUDA_C_64F,

python/tests/cuquantum_tests/cutensornet_tests/test_cutensornet.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from collections import abc
77
import functools
88
import os
9+
import sys
910
import tempfile
1011

1112
try:
@@ -31,6 +32,11 @@
3132
#
3233
###################################################################
3334

35+
if cffi:
36+
# if the Python binding is not installed in the editable mode (pip install
37+
# -e .), the cffi tests would fail as the modules cannot be imported
38+
sys.path.append(os.getcwd())
39+
3440
dtype_to_data_type = {
3541
numpy.float16: cudaDataType.CUDA_R_16F,
3642
numpy.float32: cudaDataType.CUDA_R_32F,
@@ -269,8 +275,10 @@ def test_get_version(self):
269275
assert ver == cutn.VERSION
270276

271277
def test_get_cudart_version(self):
278+
# CUDA runtime is statically linked, so we can't compare
279+
# with the "runtime" version
272280
ver = cutn.get_cudart_version()
273-
assert ver == cupy.cuda.runtime.runtimeGetVersion()
281+
assert isinstance(ver, int)
274282

275283

276284
class TestHandle:

0 commit comments

Comments
 (0)