Revert "Add wheel support for Newton-Schulz method via cuSolverMp"#3151
Conversation
Greptile SummaryThis PR reverts the wheel-level cuSolverMp integration added in #3004, removing it from the Docker build images, the wheel build script, the PyPI dependency list, and the runtime library loader. The underlying C++ Newton-Schulz implementation and its
Confidence Score: 5/5Safe to merge — this is a targeted revert of wheel-level cuSolverMp wiring with no functional regressions; the C++ implementation remains intact behind its opt-in build flag. All removed code is self-contained: Docker image setup, a wheel build export, a PyPI dependency call, and a ctypes loader that has no remaining references. The C++ cuSolverMp path is still available via the NVTE_WITH_CUSOLVERMP CMake flag for manual builds, so nothing is permanently deleted. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Wheel Build Triggered] --> B[Dockerfile.x86 / Dockerfile.aarch]
B -->|before revert| C[Install cuSolverMp via dnf\nSet CUSOLVERMP_HOME]
B -->|after revert| D[No cuSolverMp installation]
C --> E[build_wheels.sh]
D --> E
E -->|before revert| F[export NVTE_WITH_CUSOLVERMP=1]
E -->|after revert| G[No cuSolverMp flag]
F --> H[setup.py cmake flags -DNVTE_WITH_CUSOLVERMP=ON]
G --> I[setup.py: NVTE_WITH_CUSOLVERMP not set]
H --> J[__init__.py loads cusolverMp ctypes]
I --> K[__init__.py: no cusolverMp loading]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[Wheel Build Triggered] --> B[Dockerfile.x86 / Dockerfile.aarch]
B -->|before revert| C[Install cuSolverMp via dnf\nSet CUSOLVERMP_HOME]
B -->|after revert| D[No cuSolverMp installation]
C --> E[build_wheels.sh]
D --> E
E -->|before revert| F[export NVTE_WITH_CUSOLVERMP=1]
E -->|after revert| G[No cuSolverMp flag]
F --> H[setup.py cmake flags -DNVTE_WITH_CUSOLVERMP=ON]
G --> I[setup.py: NVTE_WITH_CUSOLVERMP not set]
H --> J[__init__.py loads cusolverMp ctypes]
I --> K[__init__.py: no cusolverMp loading]
Reviews (2): Last reviewed commit: "Revert "Add wheel support for Newton-Sch..." | Re-trigger Greptile |
| import platform | ||
| from pathlib import Path | ||
| from importlib.metadata import PackageNotFoundError, distribution, version as get_version | ||
| from importlib.metadata import version as get_version |
There was a problem hiding this comment.
The revert dropped
PackageNotFoundError from the named import but kept the reference as importlib.metadata.PackageNotFoundError. This works because import importlib is present and the from importlib.metadata import statement loads the submodule, but it is an inconsistent style. Re-adding the name to the existing from import keeps the catch site readable and consistent with how the rest of the file uses importlib.metadata symbols.
| from importlib.metadata import version as get_version | |
| from importlib.metadata import PackageNotFoundError, version as get_version |
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!
| version_tuple = tuple(int(part) for part in version_str.split(".") if part.isdigit()) | ||
| return version_tuple | ||
| except PackageNotFoundError: | ||
| except importlib.metadata.PackageNotFoundError: |
There was a problem hiding this comment.
Pairing change: once
PackageNotFoundError is re-exported from the from importlib.metadata import line above, the catch clause can revert to the shorter, original form.
| except importlib.metadata.PackageNotFoundError: | |
| except PackageNotFoundError: |
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!
)" This reverts commit 20e185c. Signed-off-by: ksivamani <ksivamani@nvidia.com>
fec7c65 to
d638d41
Compare
|
/te-ci |
Reverts #3004
Needs more proper thought on nvidia cuda-python lib dependencies in the Jax ecosystem.