| 510 | } |
| 511 | |
| 512 | void Graph::PopulateDynamicShape(void) |
| 513 | { |
| 514 | /* assume all the input nodes of a node are before the node in seq_nodes array */ |
| 515 | |
| 516 | int node_number = seq_nodes.size(); |
| 517 | |
| 518 | for(int i = 0; i < node_number; i++) |
| 519 | { |
| 520 | Node* node = seq_nodes[i]; |
| 521 | |
| 522 | bool dynamic_shape = node->IsDynamicShape(); |
| 523 | |
| 524 | if(dynamic_shape) |
| 525 | { |
| 526 | for(unsigned int n = 0; n < node->GetOutputNum(); n++) |
| 527 | { |
| 528 | NodePort* port = node->GetOutputPort(n); |
| 529 | Tensor* tensor = port->tensor; |
| 530 | |
| 531 | for(unsigned int k = 0; k < tensor->consumer.size(); k++) |
| 532 | { |
| 533 | NodePort* in_port = tensor->consumer[k]; |
| 534 | Node* child = in_port->owner; |
| 535 | child->SetDynamicShape(dynamic_shape); |
| 536 | } |
| 537 | } |
| 538 | } |
| 539 | } |
| 540 | } |
| 541 | |
| 542 | void Graph::StripGraph(void) |
| 543 | { |
nothing calls this directly
no test coverage detected