MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / export_placement

Method export_placement

tensorflow/python/grappler/controller.py:123–131  ·  view source on GitHub ↗

Annotate the placement onto the specified metagraph. Args: metagraph: the metagraph to annotate with the placement.

(self, metagraph)

Source from the content-addressed store, hash-verified

121 raise NotImplementedError
122
123 def export_placement(self, metagraph):
124 """Annotate the placement onto the specified metagraph.
125
126 Args:
127 metagraph: the metagraph to annotate with the placement.
128 """
129 for node in metagraph.graph_def.node:
130 if node.name in self.important_op_names:
131 node.device = self.get_node_by_name(node.name).device
132
133 # Get the nodes in the immediate fanin of node.
134 # Beware: this doesn't take into account the nodes that may be skipped

Callers 1

PlaceGraphFunction · 0.80

Calls 1

get_node_by_nameMethod · 0.95

Tested by

no test coverage detected