Commit 8458b7f4 authored by Michał Karzyński's avatar Michał Karzyński Committed by Scott Cyphers

[ONNX] User friendly assert message when op is not supported (#2478)

* User friendly assert message

* User friendly assert message

* Update UT
parent 8ea8ea3c
......@@ -123,8 +123,9 @@ namespace ngraph
}
}
NGRAPH_ASSERT(unknown_operators.empty()) << "unknown operations: "
<< detail::to_string(unknown_operators);
NGRAPH_ASSERT(unknown_operators.empty())
<< "nGraph does not support the following ONNX operations: "
<< detail::to_string(unknown_operators);
// Process ONNX graph nodes, convert to nGraph nodes
for (const auto& node_proto : m_graph_proto->node())
......
......@@ -1326,7 +1326,7 @@ TEST(onnx_${BACKEND_NAME}, model_unsupported_op)
catch (ngraph::ngraph_error const& err)
{
std::string what{err.what()};
EXPECT_NE(what.find("unknown operations"), std::string::npos);
EXPECT_NE(what.find("nGraph does not support"), std::string::npos);
EXPECT_NE(what.find("FakeOpName"), std::string::npos);
EXPECT_NE(what.find("AnotherFakeOpName"), std::string::npos);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment