lrjconan / LanczosNetwork

Lanczos Network, Graph Neural Networks, Deep Graph Convolutional Networks, Deep Learning on Graph Structured Data, QM8 Quantum Chemistry Benchmark, ICLR 2019
http://arxiv.org/abs/1901.01484
MIT License
311 stars 66 forks source link

Reason for setting up segment reduction #5

Closed sha256feng closed 5 years ago

sha256feng commented 5 years ago

In the "setup.sh" file, the program called a python script to do segment reduction based on Pytorch version and whether Cuda is available. I have acquainted myself with some knowledge on C++ and Cuda extension of Pytorch. Yet I still had difficulty understanding why we need to have the segment reduction extension. Can you explain a bit?

Thanks, Shasha

lrjconan commented 5 years ago

In the "setup.sh" file, the program called a python script to do segment reduction based on Pytorch version and whether Cuda is available. I have acquainted myself with some knowledge on C++ and Cuda extension of Pytorch. Yet I still had difficulty understanding why we need to have the segment reduction extension. Can you explain a bit?

Thanks, Shasha

Hi, sorry for the late response. You can ignore the segment reduction part as it is legacy code for implementing the memory-efficient version of GNN which requires something like unsorted_seg_sum function as in Tensorflow. Pytorch now supports unsorted_seg_sum via scatter_add.