|
|
|
@@ -581,6 +581,8 @@ Status ModelBuilder::SaveDataToModel(ge::Model &model, ge::GeModel &ge_model) { |
|
|
|
// Add TBE Kernels and custom aicpu op bin |
|
|
|
std::set<std::string> tbe_name_set; |
|
|
|
std::set<std::string> aicpu_name_set; |
|
|
|
std::set<std::string> aicpu_optype_set; |
|
|
|
std::set<std::string> aicpu_tf_optype_set; |
|
|
|
for (const ge::NodePtr &n : compute_graph_->GetNodes(compute_graph_->GetGraphUnknownFlag())) { |
|
|
|
auto node_op_desc = n->GetOpDesc(); |
|
|
|
GE_IF_BOOL_EXEC(node_op_desc == nullptr, continue); |
|
|
|
@@ -607,7 +609,7 @@ Status ModelBuilder::SaveDataToModel(ge::Model &model, ge::GeModel &ge_model) { |
|
|
|
tbe_kernel_store_.AddTBEKernel(tbe_kernel); |
|
|
|
} |
|
|
|
|
|
|
|
(void)SetModelAicpuCheckAttr(model); |
|
|
|
(void)SetModelCheckAicpuAttr(model); |
|
|
|
|
|
|
|
for (const ge::NodePtr &n : compute_graph_->GetNodes(compute_graph_->GetGraphUnknownFlag())) { |
|
|
|
auto node_op_desc = n->GetOpDesc(); |
|
|
|
@@ -820,11 +822,9 @@ Status ModelBuilder::CollectCheckAicpuAttr(const OpDescPtr &op_desc, std::set<st |
|
|
|
return SUCCESS; |
|
|
|
} |
|
|
|
|
|
|
|
Status ModelBuilder::SetModelCheckAicpuAttr(ge::Model &model) { |
|
|
|
Status ModelBuilder::SetModelCheckAicpuAttr(ge::Model &model, std::set<std::string> &aicpu_optype_set, std::set<std::string> &aicpu_tf_optype_set) { |
|
|
|
std::vector<std::string> aicpu_optype_list; |
|
|
|
std::vector<std::string> aicpu_tf_optype_list; |
|
|
|
std::set<std::string> aicpu_optype_set; |
|
|
|
std::set<std::string> aicpu_tf_optype_set; |
|
|
|
if (ge::AttrUtils::GetListStr(&model, "needCheckCpu", aicpu_optype_list)) { |
|
|
|
GELOGI("Already have aicpu optype size: %zu", aicpu_optype_list.size()); |
|
|
|
aicpu_optype_set.insert(aicpu_optype_list.begin(), aicpu_optype_list.end()); |
|
|
|
|