Skip to content

Drop unused cuRAND and cuSOLVER dependencies - #2309

Open
ramakrishnap-nv wants to merge 1 commit into
NVIDIA:mainfrom
ramakrishnap-nv:drop-unused-curand-cusolver
Open

ramakrishnap-nv wants to merge 1 commit into
NVIDIA:mainfrom
ramakrishnap-nv:drop-unused-curand-cusolver

Conversation

@ramakrishnap-nv

@ramakrishnap-nv ramakrishnap-nv commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Description

cuOpt declares, links, or bundles cuRAND and cuSOLVER in several places, but no cuOpt library calls either one. These are dependencies from raft.

No cuOpt library or the Java JNI library uses either one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Ramakrishna Prabhu <ramakrishnap@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Nov 10, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@ramakrishnap-nv ramakrishnap-nv added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Nov 10, 2026
@ramakrishnap-nv ramakrishnap-nv added this to the 27.02 milestone Nov 10, 2026
@ramakrishnap-nv

Copy link
Copy Markdown
Collaborator Author

/ok to test e8076eb

@ramakrishnap-nv

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@ramakrishnap-nv
ramakrishnap-nv marked this pull request as ready for review November 10, 2026 22:56
@ramakrishnap-nv
ramakrishnap-nv requested review from a team as code owners November 10, 2026 22:56
@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The change updates CUDA library dependency and packaging settings for Python wheels and the Java JAR. It removes selected cuRAND and cuSolver components, paths, and exclusions, and updates Java linking, bundling, verification, and preload configuration. The routing wheel exclusion list adds libcudss.

Changes: Python wheel configuration

Layer / File(s) Summary
Toolkit components and RPATH
dependencies.yaml, python/libcuopt_mathopt/pyproject.toml, python/cmake/cuopt_wheel_build.cmake
CUDA Toolkit specifications remove the curand and cusolver components. The shared wheel RPATH list removes their library paths.
Wheel repair exclusions
ci/build_wheel_*.sh
The wheel repair exclusion lists remove libcurand.so.* and libcusolver.so.*. The routing wheel list adds libcudss.so.*.

Java JAR dependencies

Layer / File(s) Summary
Native dependency packaging
java/cuopt/CMakeLists.txt, java/cuopt/ci/*, java/cuopt/src/main/java/com/nvidia/cuopt/mathematicaloptimization/NativeLibraryLoader.java, docs/cuopt/source/cuopt-java/quick-start.rst
The static Java build drops CUDA::cusolver. JAR packaging no longer excludes libcusolver from companion bundling, and dependency verification no longer accepts libcusolver.so or libcurand.so as external. The loader no longer preloads libcusolver.so. The quick-start note names libcusparse instead of libcusolver.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Merge Risk: Minimal · up to e8076

No merge-blocking failure was identified, though artifact-level dependency validation remains outstanding.

Security architecture risk: Low · up to e8076

The changes remove explicit dependency requirements and narrow Java's external-library exceptions without demonstrating a new security bypass. Risk remains bounded, but the produced packages and their transitive native dependencies were not available to confirm end-to-end behavior.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The Java security-sensitive outcome is native code execution within the consuming JVM. Companion provenance remains dependent on the build environment and packaged resources; the changed lists do not establish a newly attacker-controlled input or increased execution privilege.

Trust Boundaries and Controls

  • observed — Java narrows, rather than widens, the external-dependency allowlist. Existing extraction controls reject a preexisting symlink or mismatched directory owner. These controls predate the PR and are not evidence that every deployment's filesystem or native search path is trustworthy.

Resilience and Maintainability Implications

  • observed — Existing extraction failures propagate instead of silently falling back to an external JNI library. Resource writes use temporary sibling files with cleanup, while existing same-size files are reused across runs. This retry and shared-cache behavior is unchanged; actual newly bundled cuSOLVER content was unavailable to establish additional exposure.
Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title clearly summarizes the removal of unused cuRAND and cuSOLVER dependencies, which is the main change.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description states that cuOpt does not call cuRAND or cuSOLVER and identifies them as dependencies from RAFT. This matches the dependency removals in the changeset.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 3 files. (4 skipped: 4 unsupported.)

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: NVIDIA/cuopt
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: 0c90faa
  • Layers: Repository YAML
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: aa3d6775-ec3e-4c3b-b63a-b72e6c3d2103
Commits

Reviewing files that changed from the base of the PR and between 0c90faa and e8076eb.

Files selected for processing: 13

  • ci/build_wheel_cuopt.sh
  • ci/build_wheel_libcuopt.sh
  • ci/build_wheel_libcuopt_client.sh
  • ci/build_wheel_libcuopt_mathopt.sh
  • ci/build_wheel_libcuopt_routing.sh
  • dependencies.yaml
  • docs/cuopt/source/cuopt-java/quick-start.rst
  • java/cuopt/CMakeLists.txt
  • java/cuopt/ci/build_cuopt_java_jar.sh
  • java/cuopt/ci/verify_jar_dependencies.sh
  • java/cuopt/src/main/java/com/nvidia/cuopt/mathematicaloptimization/NativeLibraryLoader.java
  • python/cmake/cuopt_wheel_build.cmake
  • python/libcuopt_mathopt/pyproject.toml
Files with no reviewable changes: 6

  • ci/build_wheel_libcuopt_routing.sh
  • ci/build_wheel_libcuopt_client.sh
  • ci/build_wheel_cuopt.sh
  • ci/build_wheel_libcuopt.sh
  • python/cmake/cuopt_wheel_build.cmake
  • ci/build_wheel_libcuopt_mathopt.sh

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

@cryos cryos left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions

Copy link
Copy Markdown

CI Test Summary

✅ All 28 test job(s) passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants