Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

heterogeneous sampling primitive #4836

Conversation

seunghwak
Copy link
Contributor

@seunghwak seunghwak commented Dec 18, 2024

We currently use edge masking for heterogeneous sampling. This is inefficient as we need scan the entire edges # edge types times every time we call a sampling function.

This PR fixes this. We extract a subgraph (seeds and their neighbors) with edge types. Then, we perform sampling on this subgraph so no need to scan the entire edge.

This PR also updated cugraph::test::mg_graph_to_sg_graph function to support edge types (which is necessary to test this primitive). A large number of files (in the test directory) are modified due to this change, but updates are just few lines for each file.

Closes #4735
Closes #4590

Copy link

copy-pr-bot bot commented Dec 18, 2024

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.

@seunghwak seunghwak added this to the 25.02 milestone Jan 27, 2025
@github-actions github-actions bot added the CMake label Jan 30, 2025
@seunghwak seunghwak changed the title [WIP] heterogeneous sampling primitive heterogeneous sampling primitive Jan 30, 2025
@seunghwak seunghwak marked this pull request as ready for review January 30, 2025 08:52
@seunghwak seunghwak requested review from a team as code owners January 30, 2025 08:52
@seunghwak seunghwak self-assigned this Jan 31, 2025
@seunghwak seunghwak added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Jan 31, 2025
Copy link
Collaborator

@ChuckHastings ChuckHastings left a comment

Choose a reason for hiding this comment

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

Looks like you're still missing some copyright updates.

Glad we could more directly incorporate the Algorithm-R code.

@ChuckHastings
Copy link
Collaborator

To be clear... this PR updates the primitive. But the sampling algorithm is not modified in this PR to use the primitive. We will need to add work in 25.04 to use this primitive, correct?

Copy link
Contributor

@jnke2016 jnke2016 left a comment

Choose a reason for hiding this comment

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

Looks good to me

@ChuckHastings
Copy link
Collaborator

/merge

@rapids-bot rapids-bot bot merged commit 20ddb53 into rapidsai:branch-25.02 Feb 4, 2025
79 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CMake cuGraph improvement Improvement / enhancement to an existing function non-breaking Non-breaking change
Projects
None yet
3 participants