-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[Performance] Fused sampling with compaction #5924
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To trigger regression tests:
|
agrabows
changed the title
[Performance] Fused sampling with compaction
[Draft][Performance] Fused sampling with compaction
Jun 28, 2023
agrabows
changed the title
[Draft][Performance] Fused sampling with compaction
[Performance] Fused sampling with compaction
Jun 28, 2023
@frozenbugs @jermainewang |
frozenbugs
reviewed
Jul 13, 2023
Co-authored-by: Hesham Mostafa <hesham.mostafa@intel.com>
frozenbugs
reviewed
Jul 19, 2023
frozenbugs
approved these changes
Jul 19, 2023
Rhett-Ying
pushed a commit
that referenced
this pull request
Aug 10, 2023
Co-authored-by: Hesham Mostafa <hesham.mostafa@intel.com>
DominikaJedynak
pushed a commit
to DominikaJedynak/dgl
that referenced
this pull request
Mar 12, 2024
Co-authored-by: Hesham Mostafa <hesham.mostafa@intel.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Changes described and discussed in github RFC #5328.
This change introduces new algorithm for NeighborSampler class. This algorithm samples mini-batches from hetero/homo-geneous graphs in one c++ function that compacts functionalities of _CAPI_DGLToBlock and _CAPI_DGLSampleNeighbors reducing time of this process. Moreover sampled DGLBlocks are already in CSC/CSR format and as such they require no COOToCSR transformation for forward pass. Additional COO matrix is attached as well to avoid CSRTranspose function call when it would be necessary for backward pass.
Coauthor: @hesham-mostafa
Checklist
Changes
Benchmark configuration
Benchmark results
Most significant speedup observed for ogbn-papers100M (up to 3.9x) with low batch-size and small fanout
Only 3 cases were worse:
ogbn-papers100M batch-size 4096 fanout 15, 30, 15 - 0.95x
ogbn-papers100M batch-size 8192 fanout 10, 30 - 0.97x
ogbn-papers100M batch-size 8192 fanout 15, 15, 15 - 0.99x