| @@ -28,6 +28,8 @@ | |||||
| #include "graph/manager/graph_mem_allocator.h" | #include "graph/manager/graph_mem_allocator.h" | ||||
| #include "graph/manager/host_mem_allocator.h" | #include "graph/manager/host_mem_allocator.h" | ||||
| #include "graph/utils/graph_utils.h" | #include "graph/utils/graph_utils.h" | ||||
| #include "graph/utils/op_desc_utils.h" | |||||
| #include "graph/utils/tensor_utils.h" | |||||
| #include "hybrid/common/npu_memory_allocator.h" | #include "hybrid/common/npu_memory_allocator.h" | ||||
| #include "hybrid/node_executor/node_executor.h" | #include "hybrid/node_executor/node_executor.h" | ||||
| @@ -1530,6 +1532,27 @@ Status HybridModelBuilder::RecoverGraphUnknownFlag() { | |||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| // for performance | |||||
| for (auto &subgraph : root_graph->GetAllSubgraphs()) { | |||||
| GE_CHECK_NOTNULL(sub_graph); | |||||
| for (const auto &node : sub_graph->GetDirectNode()) { | |||||
| auto op_desc = node->GetOpDesc(); | |||||
| GE_CHECK_NOTNULL(op_desc); | |||||
| OpDescUtils::TransformRunAttrToMember(*op_desc); | |||||
| for (auto &tensor_desc : op_desc->GetAllInputsDescPtr()) { | |||||
| if (tensor_desc == nullptr) { | |||||
| continue; | |||||
| } | |||||
| TensorUtils::TransformRunAttrToMember(*tensor_desc); | |||||
| } | |||||
| for (auto &tensor_desc : op_desc->GetAllOutputsDescPtr()) { | |||||
| if (tensor_desc == nullptr) { | |||||
| continue; | |||||
| } | |||||
| TensorUtils::TransformRunAttrToMember(*tensor_desc); | |||||
| } | |||||
| } | |||||
| } | |||||
| return SUCCESS; | return SUCCESS; | ||||
| } | } | ||||