Annotate the placement onto the specified metagraph. Args: metagraph: the metagraph to annotate with the placement.
(self, metagraph)
| 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 |
no test coverage detected