Skip to content

Combine sampling primitive calls into fewer TUs to decrease size#5583

Open
ChuckHastings wants to merge 1 commit into
rapidsai:mainfrom
ChuckHastings:reduce_binary_size_sampling
Open

Combine sampling primitive calls into fewer TUs to decrease size#5583
ChuckHastings wants to merge 1 commit into
rapidsai:mainfrom
ChuckHastings:reduce_binary_size_sampling

Conversation

@ChuckHastings

Copy link
Copy Markdown
Collaborator

Supercedes #5574.

We get a pretty good reduction in binary size by combining the TUs that call the sampling primitives. We'll start there, since this preserves the header-only design aspect of the primitives.

Stage libcugraph_common.so libcugraph.so libcugraph_mg.so Combined
CUDA 12 Before 89.5 MB 702.7 MB 822.4 MB 1614.5 MB
CUDA 12 After 253.5 MB (+164.1, +183.4%) 561.5 MB (-141.2 -20.1%) 673.2 MB (-149.1, -18.1%) 1488.3 MB (-126.2, -7.8%)

@copy-pr-bot

copy-pr-bot Bot commented Jul 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.

@ChuckHastings ChuckHastings marked this pull request as ready for review July 10, 2026 21:37
@ChuckHastings ChuckHastings requested review from a team as code owners July 10, 2026 21:37
@ChuckHastings ChuckHastings added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Jul 10, 2026

@seunghwak seunghwak left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM besides the minor issues below.

Comment thread cpp/.clang-format
BreakStringLiterals: true
ColumnLimit: 100
CommentPragmas: '^ IWYU pragma:'
CommentPragmas: '^ ?[*]? ?(IWYU pragma:|SPDX-)'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What is this? Did you pull updates from another unmerged PR?

@bdice bdice Jul 11, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We probably want the version in #5582. Please see rapidsai/build-planning#303 and that PR's description for details.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should this be .cuh? Or can be .hpp?

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

Labels

improvement Improvement / enhancement to an existing function non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants