-
Notifications
You must be signed in to change notification settings - Fork 3k
[GraphBolt][CUDA] Refactor overlap_graph_fetch
, simplify gb.DataLoader
.
#7681
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
[GraphBolt][CUDA] Refactor overlap_graph_fetch
, simplify gb.DataLoader
.
#7681
Conversation
To trigger regression tests:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Went over the whole code and seems to look good to me.
@@ -134,16 +134,14 @@ def create_dataloader( | |||
############################################################################ | |||
if args.storage_device != "cpu": | |||
datapipe = datapipe.copy_to(device) | |||
datapipe = datapipe.sample_neighbor(graph, args.fanout) | |||
datapipe = datapipe.sample_neighbor( | |||
graph, args.fanout, overlap_fetch=args.storage_device == "pinned" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did we release the overlap_fetch in last release, if so, we need to highlight the API change if we really believe this is a good api change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is in DGL 2.3. In this release, this parameter moved from gb.DataLoader
to sample_neighbor
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://docs.dgl.ai/en/latest/generated/dgl.graphbolt.DataLoader.html#dgl.graphbolt.DataLoader shows the overlap_graph_fetch option.
Description
gb.DataLoader
to the sampling classes foroverlap_graph_fetch
. It is an argument of the sampler now.gpu_graph_cache
to the FusedCSCSamplingGraph because otherwise it won't be shared across train or validation dataloader for example. That way, there will be a single graph cache for multiple dataloader instances.The end goal is to make sampling and compaction async and hide the latency of GPU CPU synchronizations during these stages. A lot of our optimizations also have inherent GPU CPU synchronization, which will be handled in the same way. I needed to clean the code and refactor before #7682.
I might refactor more and reduce the amount of code in our code base in the future.
Checklist
Please feel free to remove inapplicable items for your PR.
Changes