Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid DeprecationWarning in cupy dispatch registration #7836

Merged
merged 1 commit into from
May 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion distributed/protocol/cupy.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,12 @@


try:
from cupy.cusparse import MatDescriptor
from packaging.version import Version

Check warning on line 71 in distributed/protocol/cupy.py

View check run for this annotation

Codecov / codecov/patch

distributed/protocol/cupy.py#L71

Added line #L71 was not covered by tests

if Version(cupy.__version__) >= Version("12"):
from cupyx.cusparse import MatDescriptor

Check warning on line 74 in distributed/protocol/cupy.py

View check run for this annotation

Codecov / codecov/patch

distributed/protocol/cupy.py#L73-L74

Added lines #L73 - L74 were not covered by tests
else:
from cupy.cusparse import MatDescriptor

Check warning on line 76 in distributed/protocol/cupy.py

View check run for this annotation

Codecov / codecov/patch

distributed/protocol/cupy.py#L76

Added line #L76 was not covered by tests
from cupyx.scipy.sparse import spmatrix
except ImportError:
MatDescriptor = None
Expand Down