| 295 | } // namespace |
| 296 | |
| 297 | void MergeNodes(const FunctionDef& first_function, |
| 298 | const FunctionDef& second_function, FunctionDef* fused_function, |
| 299 | FunctionDefLibrary* library) { |
| 300 | // Copy all nodes from first_function. |
| 301 | fused_function->mutable_node_def()->CopyFrom(first_function.node_def()); |
| 302 | // Copy transformed nodes from the second function. |
| 303 | fused_function->mutable_node_def()->MergeFrom(second_function.node_def()); |
| 304 | } |
| 305 | |
| 306 | bool CanCompose(const OpDef& first_signature, const OpDef& second_signature) { |
| 307 | // TODO(prazek): Functions can have additional inputs being placeholders |