-
Notifications
You must be signed in to change notification settings - Fork 759
Revert "Add wheel support for Newton-Schulz method via cuSolverMp" #3151
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -14,7 +14,7 @@ | |||||
| import sys | ||||||
| import platform | ||||||
| from pathlib import Path | ||||||
| from importlib.metadata import PackageNotFoundError, distribution, version as get_version | ||||||
| from importlib.metadata import version as get_version | ||||||
| from subprocess import CalledProcessError | ||||||
| from typing import List, Optional, Tuple, Union | ||||||
|
|
||||||
|
|
@@ -323,17 +323,10 @@ def cuda_version() -> Tuple[int, ...]: | |||||
| version_str = get_version("nvidia-cuda-runtime-cu12") | ||||||
| version_tuple = tuple(int(part) for part in version_str.split(".") if part.isdigit()) | ||||||
| return version_tuple | ||||||
| except PackageNotFoundError: | ||||||
| except importlib.metadata.PackageNotFoundError: | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! |
||||||
| raise RuntimeError("Could neither find NVCC executable nor CUDA runtime Python package.") | ||||||
|
|
||||||
|
|
||||||
| def cusolvermp_pypi_package_name(cuda_major: Optional[int] = None) -> str: | ||||||
| """PyPI package providing cuSolverMp runtime libraries for a CUDA major version.""" | ||||||
| if cuda_major is None: | ||||||
| cuda_major = cuda_version()[0] | ||||||
| return f"nvidia-cusolvermp-cu{cuda_major}" | ||||||
|
|
||||||
|
|
||||||
| def get_frameworks() -> List[str]: | ||||||
| """DL frameworks to build support for""" | ||||||
| _frameworks: List[str] = [] | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PackageNotFoundErrorfrom the named import but kept the reference asimportlib.metadata.PackageNotFoundError. This works becauseimport importlibis present and thefrom importlib.metadata importstatement loads the submodule, but it is an inconsistent style. Re-adding the name to the existingfromimport keeps the catch site readable and consistent with how the rest of the file usesimportlib.metadatasymbols.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!