change runtime error to type error when cannot find kernel info

This commit is contained in:
lianliguang 2020-04-28 15:41:34 +08:00
parent 517e3235ba
commit e9c3a5a7f8
1 changed files with 2 additions and 2 deletions

View File

@ -482,8 +482,8 @@ void SelectKernelInfo(const CNodePtr &kernel_node) {
if (selected_kernel_info == nullptr) {
std::ostringstream buffer;
PrintInputAndOutputInferType(buffer, kernel_node);
MS_LOG(EXCEPTION) << "The node [" << kernel_node->DebugString()
<< "] cannot find valid kernel info, not supported the type" << buffer.str();
MS_EXCEPTION(TypeError) << "The node [" << kernel_node->DebugString()
<< "] cannot find valid kernel info, not supported the type" << buffer.str();
} else {
PrintRaiseOrReducePrecisionSelectedInfo(kernel_node, selected_kernel_info, precision_reduce);
}