Skip to content

Conversation

@rgsl888prabhu
Copy link
Collaborator

@rgsl888prabhu rgsl888prabhu commented Oct 15, 2025

Description

Reduce package sizes which has increased due to underlying thirdpaty modules being pulled in.

Issue

closes #410
closes #181

libcuopt

Before:
cuda -12

file size
  * compressed size: 0.706G
  * uncompressed size: 1.048G
  * compression space saving: 32.6%
contents

cuda -13

file size
  * compressed size: 0.793G
  * uncompressed size: 1.045G
  * compression space saving: 24.2%
contents
  * directories: 2647
  * files: 20519 (33 compiled)

After:

cuda-12:

file size
  * compressed size: 0.568G
  * uncompressed size: 0.775G
  * compression space saving: 26.7%

cuda-13:

file size
  * compressed size: 0.435G
  * uncompressed size: 0.518G
  * compression space saving: 16.1%

Checklist

  • I am familiar with the Contributing Guidelines.
  • Testing
    • New or existing tests cover these changes
    • Added tests
    • Created an issue to follow-up
    • NA
  • Documentation
    • The documentation is up to date with these changes
    • Added new documentation
    • NA

Summary by CodeRabbit

  • Chores
    • Reduced the maximum allowed compressed package size to shrink the distribution footprint.
    • Excluded deprecated internal dependency paths from built wheels to avoid bundling unnecessary files.
    • Added an unconditional post-install cleanup of transient build artifacts and refined wheel-repair exclusions to streamline published packages and avoid including unwanted files.

@rgsl888prabhu rgsl888prabhu requested a review from a team as a code owner October 15, 2025 21:46
@rgsl888prabhu rgsl888prabhu requested review from vyasr and removed request for a team October 15, 2025 21:46
@rgsl888prabhu rgsl888prabhu self-assigned this Oct 15, 2025
@rgsl888prabhu rgsl888prabhu added non-breaking Introduces a non-breaking change improvement Improves an existing functionality labels Oct 15, 2025
@coderabbitai
Copy link

coderabbitai bot commented Oct 16, 2025

Walkthrough

Updated packaging/build scripts to exclude additional papilo artifacts during wheel repair and wheel creation, remove papilo CMake dependency files during conda install, and reduce the compressed-size threshold in pyproject.toml.

Changes

Cohort / File(s) Summary
Auditwheel / wheel-repair script
ci/build_wheel_libcuopt.sh
Modified auditwheel repair exclude patterns: changed libnvJitLink*.so*libnvJitLink* and added exclusion for libpapilo-core.a.
Conda package install cleanup
conda/recipes/libcuopt/recipe.yaml
Added unconditional post-install cleanup: rm -rf "${PREFIX}/lib/cmake/papilo/_deps" to remove vendored papilo CMake dependency files.
Python packaging config
python/libcuopt/pyproject.toml
Reduced max_allowed_size_compressed from 900M585M. Added [tool.scikit-build].wheel.exclude entries to exclude libcuopt/lib64/cmake/papilo/_deps/** and libcuopt/lib/cmake/papilo/_deps/** from built wheels.

Sequence Diagram(s)

sequenceDiagram
    participant CI as CI Build
    participant CMake as CMake Install
    participant Conda as Conda Build
    participant Auditwheel as auditwheel repair
    participant Wheel as Final Wheel

    CI->>CMake: run cmake & install
    CMake->>Conda: install tree (includes papilo/_deps)
    Conda->>Conda: rm -rf "${PREFIX}/lib/cmake/papilo/_deps"
    CI->>Auditwheel: run auditwheel repair (with updated excludes)
    Auditwheel->>Wheel: produce repaired wheel (papilo artifacts excluded)
    Note over Auditwheel,Conda: pyproject.toml size threshold also lowered before packaging
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 I hopped through build scripts in the night,

I nudged out papilo bits just right,
Trimmed the wheel, set size to slim,
A lighter package — cheeky whim! 🥕

Pre-merge checks and finishing touches

✅ Passed checks (4 passed)
Check name Status Explanation
Title Check ✅ Passed The title "Reduce package sizes" directly and clearly summarizes the main objective of the pull request. The code changes consistently target this goal by excluding unnecessary third-party dependency files (papilo), updating auditwheel patterns, and adjusting wheel size thresholds. The title is concise, specific, and accurately reflects the primary change without being vague or generic.
Out of Scope Changes Check ✅ Passed All changes in the pull request are directly scoped to reducing package sizes by removing unnecessary files. The modifications to ci/build_wheel_libcuopt.sh adjust auditwheel exclusion patterns for papilo libraries, the conda recipe adds cleanup for papilo CMake directories, and pyproject.toml updates wheel exclusion rules and size thresholds—all targeted at eliminating third-party vendored dependencies and reducing overall wheel size. No unrelated refactoring, feature additions, or bug fixes appear to be present.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
python/libcuopt/pyproject.toml (1)

85-87: Broaden the _deps exclusion to cover lib installs too.

CMake can install into either lib or lib64 depending on the platform/toolchain. We now drop ${PREFIX}/lib/cmake/papilo/_deps in the Conda recipe (Line 137), but the wheel exclusion only matches lib64. On platforms where the wheel lands under libcuopt/lib/cmake/..., we’ll still ship the _deps tree and lose the size savings. Please include both possibilities (e.g., add a second pattern for libcuopt/lib/... or use a lib* glob) so the cleanup is reliable across build images.

Apply this diff:

 wheel.exclude = [
-  "libcuopt/lib64/cmake/papilo/_deps/**",
+  "libcuopt/lib64/cmake/papilo/_deps/**",
+  "libcuopt/lib/cmake/papilo/_deps/**",
 ]
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 282c52b and 8eeffbe.

📒 Files selected for processing (3)
  • ci/build_wheel_libcuopt.sh (1 hunks)
  • conda/recipes/libcuopt/recipe.yaml (1 hunks)
  • python/libcuopt/pyproject.toml (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: wheel-build-cuopt-sh-client / 13.0.1, 3.10, amd64, rockylinux8
  • GitHub Check: wheel-build-cuopt-mps-parser / 13.0.1, 3.11, amd64, rockylinux8
  • GitHub Check: wheel-build-cuopt-mps-parser / 13.0.1, 3.13, amd64, rockylinux8
  • GitHub Check: wheel-build-cuopt-mps-parser / 13.0.1, 3.10, arm64, rockylinux8
  • GitHub Check: wheel-build-cuopt-mps-parser / 13.0.1, 3.11, arm64, rockylinux8
  • GitHub Check: wheel-build-cuopt-mps-parser / 13.0.1, 3.12, arm64, rockylinux8
  • GitHub Check: wheel-build-cuopt-mps-parser / 13.0.1, 3.12, amd64, rockylinux8
  • GitHub Check: wheel-build-cuopt-mps-parser / 13.0.1, 3.13, arm64, rockylinux8
  • GitHub Check: wheel-build-cuopt-mps-parser / 13.0.1, 3.10, amd64, rockylinux8
  • GitHub Check: checks / check-style

@anandhkb anandhkb added this to the 25.12 milestone Oct 17, 2025
@rgsl888prabhu
Copy link
Collaborator Author

@coderabbitai approve

@coderabbitai
Copy link

coderabbitai bot commented Oct 20, 2025

✅ Actions performed

Comments resolved.

@rgsl888prabhu
Copy link
Collaborator Author

/merge

1 similar comment
@rgsl888prabhu
Copy link
Collaborator Author

/merge

@rgsl888prabhu
Copy link
Collaborator Author

@coderabbitai approve

@coderabbitai
Copy link

coderabbitai bot commented Oct 20, 2025

✅ Actions performed

Comments resolved.

@rgsl888prabhu
Copy link
Collaborator Author

/merge

@anandhkb anandhkb merged commit fb9c3c9 into NVIDIA:branch-25.12 Oct 21, 2025
89 checks passed
rapids-bot bot pushed a commit that referenced this pull request Oct 22, 2025
A follow-up PR for #507, this PR uses EXCLUDE_FROM_ALL on papilo.

Authors:
  - Ramakrishnap (https://github.com/rgsl888prabhu)

Approvers:
  - Trevor McKay (https://github.com/tmckayus)
  - Vyas Ramasubramani (https://github.com/vyasr)

URL: #521
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.

[FEA] inspect wheel contents, remove anything unnecessary [FEA] Reduce libcuopt binary size

3 participants