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

Method build_adjacency_list

python/paddle/base/framework.py:5904–5915  ·  view source on GitHub ↗

Build an adjacency list of operations for the `graph`. Returns: dict{IrNode: set(IrNode)}: the adjacency list.

(self)

Source from the content-addressed store, hash-verified

5902 return [IrNode(n) for n in ordered_nodes]
5903
5904 def build_adjacency_list(self):
5905 """
5906 Build an adjacency list of operations for the `graph`.
5907
5908 Returns:
5909 dict{IrNode: set(IrNode)}: the adjacency list.
5910 """
5911 adj_list = core.build_adjacency_list(self.graph)
5912 wrapped_adj_list = {}
5913 for k, v in adj_list.items():
5914 wrapped_adj_list[IrNode(k)] = {IrNode(n) for n in v}
5915 return wrapped_adj_list
5916
5917 def draw(self, save_path, name, marked_nodes=None, remove_ctr_var=True):
5918 """

Callers

nothing calls this directly

Calls 2

IrNodeClass · 0.70
itemsMethod · 0.45

Tested by

no test coverage detected