dgl.NodeFlow.register_reduce_func

NodeFlow.register_reduce_func(func, block_id='__ALL__')[source]

Register global message reduce function for a block.

Once registered, func will be used as the default message reduce function in message passing operations, including block_compute(), prop_flow().

Parameters:
  • func (callable) – Reduce function on the node. The function should be a Node UDF.
  • block_id (int or ALL) – the block to register the reduce function.