dgl.NodeFlow.block_compute¶

NodeFlow.block_compute(block_id, message_func='default', reduce_func='default', apply_node_func='default', v='__ALL__', inplace=False)[source]

Perform the computation on the specified block. It’s similar to pull in DGLGraph. On the given block i, it runs pull on nodes in layer i+1, which generates messages on edges in block i, runs the reduce function and node update function on nodes in layer i+1.

Parameters: block_id (int) – The block to run the computation. message_func (callable, optional) – Message function on the edges. The function should be an Edge UDF. reduce_func (callable, optional) – Reduce function on the node. The function should be a Node UDF. apply_node_func (callable, optional) – Apply function on the nodes. The function should be a Node UDF. v (a list of vertex Ids or ALL.) – The Node Ids (unique in the NodeFlow) in layer block_id+1 to run the computation. inplace (bool, optional) – If True, update will be done in place, but autograd will break.