6770d28a844597e064b2e0902a36207ff877857d,python/tvm/relay/frontend/tensorflow.py,GraphProto,_get_relay_func,#GraphProto#Any#Any#Any#Any#,2559

Before Change


        exits = []
        // Sort control flow nodes to move all Exit nodes to the end
        // of corresponding while_loop block.
        for i, node in enumerate(control_flow_nodes):
            node_name_prefix = node.name.rsplit("/", 1)[0]
            if current_node_name_prefix is None or current_node_name_prefix != node_name_prefix:
                if node_name_prefix in self._while_loop_name_set:
                    sorted_cf_nodes.extend(exits)
                    exits.clear()

After Change


                    ordered_prefix.append(loop_name)
                    exit_pos_map[loop_name] = len(sorted_cf_nodes)
                sorted_cf_nodes.append(node)
            elif loop_name in self._while_loop_name_set:
                if loop_name not in exit_pos_map:
                    sorted_cf_nodes.append(node)
                else:
                    sorted_cf_nodes.insert(exit_pos_map[loop_name], node)
                    for j in range(ordered_prefix.index(loop_name), len(ordered_prefix)):
                        exit_pos_map[ordered_prefix[j]] += 1
            else:
                sorted_cf_nodes.append(node)

        for node in sorted_cf_nodes:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: apache/incubator-tvm
Commit Name: 6770d28a844597e064b2e0902a36207ff877857d
Time: 2020-09-03
Author: kevinthesunwy@gmail.com
File Name: python/tvm/relay/frontend/tensorflow.py
Class Name: GraphProto
Method Name: _get_relay_func


Project Name: home-assistant/home-assistant
Commit Name: d91fe792c56d872e9054fd608978fd51a99142dd
Time: 2015-11-27
Author: happyleaves.tfr@gmail.com
File Name: homeassistant/components/light/limitlessled.py
Class Name:
Method Name: setup_platform


Project Name: home-assistant/home-assistant
Commit Name: 5fba67f6c37a7c36935e4f9cb227b21f1b7a1c7b
Time: 2015-11-29
Author: happyleaves.tfr@gmail.com
File Name: homeassistant/components/light/limitlessled.py
Class Name:
Method Name: setup_platform