-
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
Add a non-blocking
option on DGLGraph.to
#1547
Comments
@ZhaofengWu Thanks for your suggestion, I'll take a look :) |
Hi there! Are you using the dataloaders from DGL with pytorch lightning? I am trying to do that but I get the suspicion that it does not accept the NodeDataLoader and EdgeDataLoaders. What is your experience? |
@sophiakrix Currently we are working with PyTorch Lightning to make DGL compatible. It requires some changes in DGL's NodeDataLoader and EdgeDataLoader. |
This issue has been automatically marked as stale due to lack of activity. It will be closed if no further activity occurs. Thank you |
The issue has been resolved in the latest release. Both Torch Lightning and async copy have been supported. |
🚀 Feature
Change
DGLGraphs
'sto
fromdef to(self, ctx):
todef to(self, ctx, non_blocking=False):
or with some other default.Motivation
I'm using pytorch-lightning, a framework that provides a scaffold for many PyTorch applications, with DGL. One thing they do is that they automatically call
.to
on every parameter toforward
(https://github.com/PyTorchLightning/pytorch-lightning/blob/98f7842970fd593c21bebfdba5da8aa311d50730/pytorch_lightning/trainer/distrib_parts.py#L458). They recently addednon_blocking=True
to this.to
call (Lightning-AI/pytorch-lightning#1843), making it no longer compatible with DGLGraph as its.to
doesn't have such an argument. Therefore, is it possible that anon_blocking
option be supported in DGL too?Alternatives
Something like
def to(self, ctx, **kwargs):
with**kwargs
entirely ignored. That'll solve the compatibility issue but is not very elegant.The text was updated successfully, but these errors were encountered: