Browse Source

!1479 log rectification

Merge pull request !1479 from liubuyu/master
tags/v0.5.0-beta
mindspore-ci-bot Gitee 5 years ago
parent
commit
a916531f76
2 changed files with 6 additions and 5 deletions
  1. +4
    -3
      mindspore/ccsrc/device/ascend/kernel_select_ascend.cc
  2. +2
    -2
      mindspore/ccsrc/pre_activate/ascend/enhancer/insert_pad_for_nms_with_mask.cc

+ 4
- 3
mindspore/ccsrc/device/ascend/kernel_select_ascend.cc View File

@@ -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) {
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;
} }


+ 2
- 2
mindspore/ccsrc/pre_activate/ascend/enhancer/insert_pad_for_nms_with_mask.cc View File

@@ -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
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);


Loading…
Cancel
Save