Question of reduce function

Hi,

if I use the GCN, the reduce function is ‘sum’. The message function is ‘copy_u’. It will copy the ‘x_u’ to m_e. And then it will sum the m_e who has the same dst node ID, and save to x_v. I’d like to know the computing process of reduce function. Do it lookup the m_e table? The first step, it will look up the Index 0 in m_e table. But there is no in degree for node 0. So the passing Feature of Node 0 is [0,0]. The second step, it will lookup the index 1. and sum. the third step, it will look up in node 2… So my question is Whether there are several nodes in this graph, how many times does the program need to lookup it?

DGL computes the reduce function in parallel, i.e. it gathers messages from m_e all at once into different nodes directly.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.