Commit b520e839 authored by Chris Sullivan's avatar Chris Sullivan Committed by Robert Kimball

Add check to hybridexecutable::get_as. (#2998)

parent e3330b47
......@@ -51,7 +51,14 @@ public:
template <typename T>
std::shared_ptr<T> get_as() const
{
return std::dynamic_pointer_cast<T>(m_executable);
if (auto exec = std::dynamic_pointer_cast<T>(m_executable))
{
return exec;
}
else
{
throw ngraph::ngraph_error("Requested invalid ngraph::Executable subclass");
}
}
/// Allow overriding the configuration of the pass manager. If you overload this method
......
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