dgl.NodeFlow.register_message_func

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

Register global message function for a block.

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

Parameters:
  • func (callable) – Message function on the edge. The function should be an Edge UDF.
  • block_id (int or ALL) – the block to register the message function.