提交 fb2cd197 编写于 作者: L liubuyu

log rectification

上级 10076ffe
...@@ -519,7 +519,7 @@ KernelSelectStatus SelectKernelInfo(const CNodePtr &kernel_node) { ...@@ -519,7 +519,7 @@ KernelSelectStatus SelectKernelInfo(const CNodePtr &kernel_node) {
if (select_status == kNoMatched) { if (select_status == kNoMatched) {
std::ostringstream buffer; std::ostringstream buffer;
PrintInputAndOutputInferType(buffer, kernel_node); PrintInputAndOutputInferType(buffer, kernel_node);
MS_LOG(WARNING) << "=========================kernel info list====================================="; MS_LOG(WARNING) << ">>> candidates kernel info list:";
for (size_t index = 0; index < kernel_info_list.size(); ++index) { for (size_t index = 0; index < kernel_info_list.size(); ++index) {
MS_LOG(WARNING) << "kernel [" << index << "] :" << kernel_info_list[index]->ToString(); MS_LOG(WARNING) << "kernel [" << index << "] :" << kernel_info_list[index]->ToString();
} }
...@@ -527,9 +527,10 @@ KernelSelectStatus SelectKernelInfo(const CNodePtr &kernel_node) { ...@@ -527,9 +527,10 @@ KernelSelectStatus SelectKernelInfo(const CNodePtr &kernel_node) {
MS_LOG(WARNING) << "kernel [" << (kernel_info_list.size() + index) MS_LOG(WARNING) << "kernel [" << (kernel_info_list.size() + index)
<< "] :" << aicpu_kernel_info_list[index]->ToString(); << "] :" << aicpu_kernel_info_list[index]->ToString();
} }
MS_LOG(WARNING) << "========================= end ===================================="; MS_LOG(WARNING) << " <<<";
MS_EXCEPTION(TypeError) << "The node [" << kernel_node->DebugString() MS_EXCEPTION(TypeError) << "The node [" << kernel_node->DebugString()
<< "] cannot find valid kernel info, not supported the type " << buffer.str(); << "] cannot find valid kernel info, not supported the type:" << buffer.str()
<< ", please refer to the supported dtypes in candidates kernel info list";
} }
return select_status; return select_status;
} }
......
...@@ -33,7 +33,7 @@ const BaseRef InsertPadForNMSWithMask::DefinePattern() const { ...@@ -33,7 +33,7 @@ const BaseRef InsertPadForNMSWithMask::DefinePattern() const {
return VectorRef({prim::kPrimNMSWithMask, Xs}); return VectorRef({prim::kPrimNMSWithMask, Xs});
} }
AnfNodePtr INsertPadToGraph(const FuncGraphPtr &func_graph, const AnfNodePtr &input, const TypeId &origin_type, AnfNodePtr InsertPadToGraph(const FuncGraphPtr &func_graph, const AnfNodePtr &input, const TypeId &origin_type,
const std::vector<size_t> &origin_shape) { const std::vector<size_t> &origin_shape) {
MS_EXCEPTION_IF_NULL(func_graph); MS_EXCEPTION_IF_NULL(func_graph);
std::vector<AnfNodePtr> new_pad_inputs; std::vector<AnfNodePtr> new_pad_inputs;
...@@ -66,7 +66,7 @@ const AnfNodePtr InsertPadForNMSWithMask::Process(const FuncGraphPtr &func_graph ...@@ -66,7 +66,7 @@ const AnfNodePtr InsertPadForNMSWithMask::Process(const FuncGraphPtr &func_graph
return nullptr; return nullptr;
} }
origin_shape[1] = 8; origin_shape[1] = 8;
auto pad = INsertPadToGraph(func_graph, cur_input, origin_type, origin_shape); auto pad = InsertPadToGraph(func_graph, cur_input, origin_type, origin_shape);
MS_EXCEPTION_IF_NULL(pad); MS_EXCEPTION_IF_NULL(pad);
pad->set_scope(cnode->scope()); pad->set_scope(cnode->scope());
AnfAlgo::SetNodeAttr("paddings", MakeValue(std::vector<std::vector<int>>{{0, 0}, {0, 3}}), pad); AnfAlgo::SetNodeAttr("paddings", MakeValue(std::vector<std::vector<int>>{{0, 0}, {0, 3}}), pad);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册