提交 269d9ce0 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!1947 fix bug of tbe adapter

Merge pull request !1947 from lianliguang/fix-bug-of-tbe-adapter
......@@ -31,7 +31,7 @@ class KernelBuildInfo {
class KernelBuildInfoBuilder;
KernelBuildInfo() {
kernel_type_ = AUTO_DIFF_KERNEL;
kernel_type_ = TBE_KERNEL;
fusion_type_ = OPAQUE;
processor_ = AICORE;
op_pattern_ = kCommonPattern;
......
......@@ -39,7 +39,7 @@ void FilterInvalidKernelInfo(const CNodePtr &kernel_node,
kernel_info_list->clear();
(void)std::copy(filtered_list.begin(), filtered_list.end(), std::back_inserter(*kernel_info_list));
} else {
MS_LOG(WARNING) << "All kernel Info list does not match any kernel info ";
MS_LOG(INFO) << "All kernel Info list does not match any kernel info ";
for (size_t index = 0; index < kernel_info_list->size(); ++index) {
std::ostringstream buffer;
MS_EXCEPTION_IF_NULL(kernel_info_list->at(index));
......@@ -50,12 +50,12 @@ void FilterInvalidKernelInfo(const CNodePtr &kernel_node,
buffer << "Kernel node's output size [" << AnfAlgo::GetInputTensorNum(kernel_node) << "]"
<< " cannot match the kernel's output size [" << kernel_info_list->at(index)->GetInputNum() << "]";
}
MS_LOG(WARNING) << "kernel [ " << index << " ] :" << kernel_info_list->at(index)->ToString() << buffer.str();
MS_LOG(INFO) << "kernel [ " << index << " ] :" << kernel_info_list->at(index)->ToString() << buffer.str();
}
kernel_info_list->clear();
MS_LOG(WARNING) << "node" << kernel_node->DebugString() << "'s output size : ["
<< AnfAlgo::GetOutputTensorNum(kernel_node) << "]"
<< "input size : [" << AnfAlgo::GetInputTensorNum(kernel_node) << "] cannot match any kernelInfo !";
MS_LOG(INFO) << "node" << kernel_node->DebugString() << "'s output size : ["
<< AnfAlgo::GetOutputTensorNum(kernel_node) << "]"
<< "input size : [" << AnfAlgo::GetInputTensorNum(kernel_node) << "] cannot match any kernelInfo !";
}
}
} // namespace
......@@ -67,8 +67,8 @@ void KernelQuery(const CNodePtr &kernel_node, std::vector<std::shared_ptr<kernel
if (kernel_info_list->empty()) {
AicpuMetadataInfo(kernel_node, kernel_info_list);
if (!kernel_info_list->empty()) {
MS_LOG(WARNING) << "The node [" << kernel_node->DebugString()
<< "] cannot find valid TBE kernel info, try to get aicpu kernel info";
MS_LOG(INFO) << "The node [" << kernel_node->DebugString()
<< "] cannot find valid TBE kernel info, try to get aicpu kernel info";
AnfAlgo::SetNodeAttr(kAttrIsAICPUKernel, MakeValue(true), kernel_node);
}
}
......
......@@ -334,7 +334,7 @@ static int TypeStrToDstType(const std::string &type_str) {
} else if (type_str == "Bool_") {
ret = 12;
} else {
MS_EXCEPTION(ArgumentError) << "type str is invailed: " << type_str;
MS_LOG(INFO) << "Error type str is invailed: " << type_str;
}
return ret;
}
......
......@@ -523,13 +523,17 @@ void AscendSession::SelectKernel(const KernelGraph &kernel_graph) const {
}
MS_LOG(INFO) << "Select ApplyKernel: " << cnode->DebugString();
}
if (raise_precision_count > 0) {
MS_LOG(WARNING) << "There has " << raise_precision_count
<< " node/nodes used raise precision to selected the kernel!";
}
if (reduce_precision_count > 0) {
MS_LOG(WARNING) << "There has " << reduce_precision_count
<< " node/nodes used reduce precision to selected the kernel!";
auto ms_context = MsContext::GetInstance();
MS_EXCEPTION_IF_NULL(ms_context);
if (ms_context->execution_mode() == kGraphMode) {
if (raise_precision_count > 0) {
MS_LOG(WARNING) << "There has " << raise_precision_count
<< " node/nodes used raise precision to selected the kernel!";
}
if (reduce_precision_count > 0) {
MS_LOG(WARNING) << "There has " << reduce_precision_count
<< " node/nodes used reduce precision to selected the kernel!";
}
}
MS_LOG(INFO) << "Finish!";
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册