b1eeb934494ef1eee20cf2d35b718790cb9cb550,python/dgl/runtime/scheduler.py,,schedule_update_all,#Any#Any#Any#Any#,258

Before Change


    reduced_feat = _gen_send_reduce(call_type, graph,
            message_func, reduce_func, (var_src, var_dst, var_eid), recv_nodes)
    // generate optional apply
    if apply_func:
        // To avoid writing reduced features back to node frame and reading
        // it again for apply phase. Instead, we first read the the node
        // features and "merge" it with the reduced features.
        v_nf = ir.READ_ROW(var_nf, var_recv_nodes)
        v_nf = ir.UPDATE_DICT(v_nf, reduced_feat)
        def _afunc_wrapper(node_data):
            nb = NodeBatch(graph, recv_nodes, node_data)
            return apply_func(nb)
        afunc = var.FUNC(_afunc_wrapper)
        applied_feat = ir.NODE_UDF(afunc, v_nf)
        final_feat = ir.UPDATE_DICT(reduced_feat, applied_feat)
    else:
        final_feat = reduced_feat
    ir.WRITE_DICT_(var_nf, final_feat)

def schedule_apply_nodes(graph, v, apply_func):
    get apply nodes schedule

After Change


    if graph.number_of_edges() == 0:
        // All the nodes are zero degree; downgrade to apply nodes
        if apply_func is not None:
            nodes = utils.toindex(slice(0, graph.number_of_nodes()))
            schedule_apply_nodes(graph, nodes, apply_func)
    else:
        call_type = "update_all"
        src, dst, _ = graph._graph.edges()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: dmlc/dgl
Commit Name: b1eeb934494ef1eee20cf2d35b718790cb9cb550
Time: 2018-11-25
Author: minjie.wang@nyu.edu
File Name: python/dgl/runtime/scheduler.py
Class Name:
Method Name: schedule_update_all


Project Name: dmlc/dgl
Commit Name: 653428bdc7880ebc45b759e675df09ae6eb146f8
Time: 2019-06-06
Author: ly979@nyu.edu
File Name: python/dgl/runtime/scheduler.py
Class Name:
Method Name: _gen_reduce


Project Name: stellargraph/stellargraph
Commit Name: 59266e34e076ed25852bccf5ce13025b5408406f
Time: 2019-05-28
Author: andrew.docherty@data61.csiro.au
File Name: stellargraph/mapper/node_mappers.py
Class Name: FullBatchNodeGenerator
Method Name: __init__


Project Name: dmlc/dgl
Commit Name: deb653f8dc9b396ba99d5c66e0658fb056f37a38
Time: 2018-11-22
Author: ly979@nyu.edu
File Name: python/dgl/graph.py
Class Name: DGLGraph
Method Name: recv