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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory consumption of the GGNN module #852
Comments
Thanks for reporting this. We are considering balancing the time/space complexity with a set of new kernels, and we will notify you of our further updates. |
Thanks for the fast reply. If both use cases (a huge number of relations + a small enough graph, and any number of relations + a medium/big graph) are common enough, it may be worth splitting into 2 different implementations and let the user decide which one is more adapted. |
Yes, considering we have no plan of new kernels recently, I'll refactor the code and uses the implementation you mentioned. For dgl v0.5 we would have better solution with new segment ops. |
Looks good to me 馃挴 |
馃悰 Bug
The memory consumption of the GGNN module prevents its application to medium/big graphs.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Environment
Confirmed to eat a lot of memory on the following environment:
conda
,pip
, source):pip install dgl-cu100
Additional context
The problem stems from the formulation used in the implementation, where each edge (containing a type) is embedded: the linear transformation for each type being modelled this way, the weights are replicated as many times as there are edges of a given type. See https://github.com/src-d/formatml/blob/master/formatml/modules/graph_encoders/ggnn.py for an implementation that maintains explicit
Linear
s and doesn't have this problem (it can probably be improved a lot btw, just giving a link here to outline the difference in implementation).The text was updated successfully, but these errors were encountered: