Commit b00530a5 authored by Adam Procter's avatar Adam Procter Committed by Robert Kimball

Update unhandled op tests to support late validation (#1961)

parent 589a1c0e
...@@ -57,14 +57,20 @@ class UnhandledOp : public ngraph::op::Op ...@@ -57,14 +57,20 @@ class UnhandledOp : public ngraph::op::Op
{ {
public: public:
UnhandledOp(const std::shared_ptr<Node>& arg) UnhandledOp(const std::shared_ptr<Node>& arg)
: Op("Unsupported_op", {}) : Op("Unsupported_op", check_single_output_args({arg}))
{ {
set_output_type(0, arg->get_element_type(), arg->get_shape()); constructor_validate_and_infer_types();
} }
shared_ptr<Node> copy_with_new_args(const NodeVector& new_args) const override shared_ptr<Node> copy_with_new_args(const NodeVector& new_args) const override
{ {
return make_shared<UnhandledOp>(new_args[0]); return make_shared<UnhandledOp>(new_args[0]);
} }
protected:
void validate_and_infer_types() override
{
set_output_type(0, get_input_element_type(0), get_input_partial_shape(0));
}
}; };
NGRAPH_TEST(${BACKEND_NAME}, unhandled_op) NGRAPH_TEST(${BACKEND_NAME}, unhandled_op)
......
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