Skip to content

wheels: avoid vendoring libnvJitLink - #1741

Merged
rapids-bot[bot] merged 2 commits into
NVIDIA:mainfrom
jameslamb:nvjitlink-dep
Aug 18, 2026
Merged

wheels: avoid vendoring libnvJitLink#1741
rapids-bot[bot] merged 2 commits into
NVIDIA:mainfrom
jameslamb:nvjitlink-dep

Conversation

@jameslamb

@jameslambjameslamb commented Aug 18, 2026

Copy link
Copy Markdown
Member

Description

Noticed while reviewing #1731 and looking through logs... cuopt-cu{12,13} wheels are vendoring a copy of libnvJitLink.so.

$ pydistcheck --inspect ./cuopt_*.whlchecking './cuopt_cu13-26.10.0a30.post260818050850-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl'----- package inspection summary -----file size * compressed size: 40.661M * uncompressed size: 99.188M * compression space saving: 59.0%contents * directories: 25 * files: 106 (10 compiled)size by extension * .33 - 93.318M (94.1%) * .so - 5.188M (5.2%) * .py - 0.477M (0.5%) * .pyx - 0.136M (0.1%) * .pxd - 34.861K (0.0%) * no-extension - 23.259K (0.0%) * .md - 7.102K (0.0%) * .txt - 4.773K (0.0%) * .json - 1.647K (0.0%)largest files * (93.318M) cuopt_cu13.libs/libnvJitLink-3ba1e744.so.13.3.33 * (1.326M) cuopt/routing/vehicle_routing_wrapper.cpython-312-x86_64-linux-gnu.so * (1.167M) cuopt/routing/utils_wrapper.cpython-312-x86_64-linux-gnu.so * (1.092M) cuopt/distance_engine/waypoint_matrix_wrapper.cpython-312-x86_64-linux-gnu.so * (0.408M) cuopt/linear_programming/solver/solver_wrapper.cpython-312-x86_64-linux-gnu.so

That's unnecessary in 2 ways:

  • cuopt doesn't directly use nvJitLink (auditwheel is probably picking that up as a transitive dependency coming from cusparse or similar)
  • even if it did, it should get a copy from nvidia-nvjitlink-cu{12,13} wheels, not vendor one

This proposes removing that file from cuopt wheels and tightening the wheel-size limits to help prevent things like this from slipping through again.

Issue

N/A

Notes for Reviewers

How I tested this

Check the pydistcheck output in CI logs from builds.

Saw wheel-testing CI pass.

Checklist

  • I am familiar with the Contributing Guidelines.
  • Testing
    • New or existing tests cover these changes
  • Documentation
    • The documentation is up to date with these changes

@copy-pr-bot

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.

@jameslamb

Copy link
Copy Markdown
MemberAuthor

/ok to test

@jameslambjameslamb added non-breaking Introduces a non-breaking change improvement Improves an existing functionality labels Aug 18, 2026
--exclude "libcusparse.so.*"
--exclude "libnccl.so.*"
--exclude "libnvJitLink*"
--exclude "libnvJitLink.so*"

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

The .so was dropped from this line in #507, I think because of a misunderstanding of the order things happened in these builds.

auditwheel repair will take a dependency on libnvJitLink.so.13.3.33 and vendor in a library renamed like cuopt_cu13.libs/libnvJitLink-3ba1e744.so.13.3.33.

But this --exclude is matched against the DT_NEEDED entries in the .so files in the wheel, not against the names auditwheel creates afterwards.

So I think we really do want .so here, to avoid accidentally matching an (unlikely, but possible) other file named like libnvJitLink-cuopt-wrapper.so or something.

@jameslamb
jameslamb marked this pull request as ready for review August 18, 2026 16:13
@jameslamb
jameslamb requested a review from a team as a code ownerAugust 18, 2026 16:13
@github-actions

github-actionsBot commented Aug 18, 2026

Copy link
Copy Markdown

CI Test Summary

✅ All 22 test job(s) passed. (1 skipped)

@coderabbitai

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 8ff19d39-db16-48ef-96cf-d391582f75c0

📥 Commits

Reviewing files that changed from the base of the PR and between dc7113b and cb9fd2b.

📒 Files selected for processing (3)
  • ci/build_wheel_cuopt.sh
  • ci/build_wheel_libcuopt.sh
  • python/cuopt/pyproject.toml

Included review availability: Your plan includes up to 12 reviews per rolling hour; 11 remain after this review.


📝 Walkthrough

Walkthrough

Changes

Wheel packaging

Layer / File(s)Summary
Auditwheel library exclusions
ci/build_wheel_cuopt.sh, ci/build_wheel_libcuopt.sh
The wheel build scripts exclude libnvJitLink.so and matching suffixes during wheel repair.
Distribution size validation
python/cuopt/pyproject.toml
The maximum compressed distribution size changed from 55Mi to 10Mi.

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

Merge Risk:⚪ Minimal · up to cb9fd

This change removes an unnecessary vendored library from the wheels and tightens size limits to prevent similar packaging regressions; no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers:ramakrishnap-nv, gforsyth

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Title check✅ PassedThe title clearly summarizes the main change: preventing libnvJitLink from being vendored in wheels.
Description check✅ PassedThe description explains the vendored dependency problem, the proposed wheel changes, and the reported validation results.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@bdice

Copy link
Copy Markdown
Contributor

/merge

@rapids-bot
rapids-botBot merged commit c2830ef into NVIDIA:mainAug 18, 2026
88 checks passed
@jameslamb
jameslamb deleted the nvjitlink-dep branch August 18, 2026 20:14
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvementImproves an existing functionalitynon-breakingIntroduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@jameslamb@bdice@ramakrishnap-nv