| 419 | } |
| 420 | |
| 421 | Status GraphTransferer::RegisterNode( |
| 422 | const IRemoteFusedGraphOpsDefinitions& ops_definitions, |
| 423 | const ShapeRefiner& shape_refiner, const Node& node, |
| 424 | const std::vector<std::pair<string, Tensor>>& input_node_info_list, |
| 425 | const std::vector<string>& output_node_names) { |
| 426 | VLOG(1) << "Register node: " << node.name() << ", " << std::hex |
| 427 | << node_name_to_id_cache_map_.at(node.name()); |
| 428 | if (node.name() == SOURCE_NODE_NAME || node.name() == SINK_NODE_NAME) { |
| 429 | // Just ignore sink and source |
| 430 | return Status::OK(); |
| 431 | } else if (node.name() == AGGREGATED_INPUT_NODE_NAME) { |
| 432 | RegisterInputNode(ops_definitions, shape_refiner, node); |
| 433 | return Status::OK(); |
| 434 | } else if (node.IsConstant()) { |
| 435 | RegisterConstantNode(shape_refiner, node); |
| 436 | } else if (IsPadNode(node)) { |
| 437 | RegisterPadNode(ops_definitions, shape_refiner, node); |
| 438 | } else if (HasPaddingAndStrides(node)) { |
| 439 | RegisterNodeWithPaddingAndStrides(ops_definitions, shape_refiner, node); |
| 440 | } else if (NeedsToAddRank(node)) { |
| 441 | RegisterNodeWithRank(ops_definitions, shape_refiner, node); |
| 442 | } else if (IsNodeFlattenReshape(node, shape_refiner)) { |
| 443 | RegisterFlattenNode(ops_definitions, shape_refiner, node); |
| 444 | } else if (ops_definitions.GetOpIdFor(node.type_string(), {}) != |
| 445 | IRemoteFusedGraphOpsDefinitions::INVALID_OP_ID) { |
| 446 | // TODO(satok): Set correct data type if it's given. |
| 447 | RegisterGenericNode(ops_definitions, shape_refiner, node); |
| 448 | } else { |
| 449 | return errors::InvalidArgument(node.type_string() + |
| 450 | " has not been implemented yet."); |
| 451 | } |
| 452 | |
| 453 | return Status::OK(); |
| 454 | } |
| 455 | |
| 456 | void GraphTransferer::RegisterConstantNode(const ShapeRefiner& shape_refiner, |
| 457 | const Node& node) { |
nothing calls this directly
no test coverage detected