pytorch_geometric icon indicating copy to clipboard operation
pytorch_geometric copied to clipboard

Add `dgNN` support

Open HenryChang213 opened this issue 3 years ago • 2 comments

  • run examples/fused_gat.py (need to install dgNN first, https://github.com/dgSPARSE/dgNN)
  • a FusedGATConv layer is added in nn/fused_gat_conv.py, which is equivalent to the standard GAT model mathmatically with less memory consumption and faster speed, due to kernel fusion techniques, as in paper 'Understanding GNN Computational Graph: A Coordinated Computation, IO, and Memory Perspective'(https://proceedings.mlsys.org/paper/2022/hash/9a1158154dfa42caddbd0694a4e9bdc8-Abstract.html)
  • a to_dgnn converting function is added in utils/to_dgnn.py to convert the edge_index format used by PyG into the CSR and CSC format used by dgNN

HenryChang213 avatar Aug 05 '22 03:08 HenryChang213

Codecov Report

Merging #5140 (fe9446e) into master (fe9446e) will not change coverage. The diff coverage is n/a.

:exclamation: Current head fe9446e differs from pull request most recent head 7c25c40. Consider uploading reports for the commit 7c25c40 to get more accurate results

@@           Coverage Diff           @@
##           master    #5140   +/-   ##
=======================================
  Coverage   84.48%   84.48%           
=======================================
  Files         360      360           
  Lines       19833    19833           
=======================================
  Hits        16756    16756           
  Misses       3077     3077           

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar Aug 05 '22 03:08 codecov[bot]

Hey @HenryChang213 could we add some tests?

Padarn avatar Aug 07 '22 01:08 Padarn

The test errors in the above check are the same ('Trainer' object has no attribute 'lr_schedulers' in test_graphgym.py). The test_graphgym.py uses the class "LoggerCallback()" in line 187. And the LoggerCallback() is in logger.py (torch_geomtric/graphgym/logger.py). There is a function called _get_stats using the "lr_schedulers". I think this is the root of the problem.

MathsCode avatar Nov 01 '22 16:11 MathsCode

The test errors in the above check are the same ('Trainer' object has no attribute 'lr_schedulers' in test_graphgym.py). The test_graphgym.py uses the class "LoggerCallback()" in line 187. And the LoggerCallback() is in logger.py (torch_geomtric/graphgym/logger.py). There is a function called _get_stats using the "lr_schedulers". I think this is the root of the problem.

It is caused by another recent commit to the master branch of PyG, so we did not fix this issue in this PR. All the tests related to this PR have passed :)

fuvty avatar Nov 01 '22 16:11 fuvty

The code looks good to me now :)

fuvty avatar Nov 04 '22 15:11 fuvty