MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / topology_sort

Method topology_sort

python/paddle/base/framework.py:5892–5902  ·  view source on GitHub ↗

Perform the topology sort operation on the graph. Notes: the `graph` can not contain a circle. Returns: list(IrNode): nodes in topology order.

(self)

Source from the content-addressed store, hash-verified

5890 return core.graph_num(self.graph)
5891
5892 def topology_sort(self):
5893 """
5894 Perform the topology sort operation on the graph.
5895
5896 Notes: the `graph` can not contain a circle.
5897
5898 Returns:
5899 list(IrNode): nodes in topology order.
5900 """
5901 ordered_nodes = core.topology_sort(self.graph)
5902 return [IrNode(n) for n in ordered_nodes]
5903
5904 def build_adjacency_list(self):
5905 """

Callers 2

_var_name_orderMethod · 0.80
resolve_hazardMethod · 0.80

Calls 1

IrNodeClass · 0.70

Tested by

no test coverage detected