| 656 | /* ===================== PostExecActions ===================== */ |
| 657 | |
| 658 | void PostExecActions::add(VarNode* var) { |
| 659 | mgb_assert(m_comp_node == var->comp_node()); |
| 660 | auto graph = ComputingGraphImpl::downcast(var->owner_graph()); |
| 661 | |
| 662 | auto&& infer_mgr = graph->static_infer_manager_impl(); |
| 663 | auto&& extra_info = graph->current_comp_seq_extra_info(); |
| 664 | Item item; |
| 665 | if (graph->var_node_mem_manager().on_var_node_device_comp_finish_needed(var)) { |
| 666 | item.need_mem_mgr = &graph->var_node_mem_manager(); |
| 667 | } |
| 668 | if (extra_info.missing_for_shape.count(var)) |
| 669 | item.shape_sync_hdl = infer_mgr.get_tag_handler_for_shape(var); |
| 670 | if (extra_info.missing_for_value.count(var)) |
| 671 | item.value_sync_hdl = infer_mgr.get_tag_handler_for_value(var); |
| 672 | |
| 673 | if (!item.empty() || !cg::is_static_var_storage(var)) { |
| 674 | item.var = var; |
| 675 | |
| 676 | // always check with recv_info since it incurs no additional cost |
| 677 | // note: if item.empty() && !is_static_storage, then we only check |
| 678 | // recv_info |
| 679 | item.recv_info = &graph->var_receiver_in_current_comp_seq(var); |
| 680 | |
| 681 | m_items.push_back(item); |
| 682 | } |
| 683 | } |
| 684 | |
| 685 | void PostExecActions::perform() { |
| 686 | bool enable = true; |
no test coverage detected