Unverified Commit 91478c00 authored by Scott Cyphers's avatar Scott Cyphers Committed by GitHub

Use OutputVector in passthrough (#4523)

* Use OutputVector in passthrough

* More Passtrhough
parent 412f5f7b
......@@ -30,6 +30,6 @@ void regclass_pyngraph_op_Passthrough(py::module m)
pass.def(py::init<const std::string&,
const std::string&,
const std::string&,
const std::vector<std::shared_ptr<ngraph::Node>>&,
const std::vector<ngraph::Output<ngraph::Node>>&,
std::vector<std::tuple<ngraph::element::Type, ngraph::PartialShape>>>());
}
......@@ -23,21 +23,6 @@ using namespace ngraph;
constexpr NodeTypeInfo op::Passthrough::type_info;
ngraph::op::Passthrough::Passthrough(const std::string& logical_type,
const std::string& language,
const std::string& function,
const NodeVector& args,
std::vector<std::tuple<element::Type, PartialShape>> outputs)
: Op{args}
, m_logical_type{logical_type}
, m_language{language}
, m_function{function}
, m_output_shapes{std::move(outputs)}
{
set_output_size(m_output_shapes.size());
constructor_validate_and_infer_types();
}
ngraph::op::Passthrough::Passthrough(const std::string& logical_type,
const std::string& language,
const std::string& function,
......@@ -77,7 +62,7 @@ void ngraph::op::Passthrough::validate_and_infer_types()
}
std::shared_ptr<ngraph::Node>
ngraph::op::Passthrough::copy_with_new_args(const NodeVector& new_args) const
ngraph::op::Passthrough::clone_with_new_inputs(const OutputVector& new_args) const
{
if (new_args.size() != get_input_size())
{
......
......@@ -45,11 +45,6 @@ public:
static constexpr NodeTypeInfo type_info{"Passthrough", 0};
const NodeTypeInfo& get_type_info() const override { return type_info; }
Passthrough() = default;
Passthrough(const std::string& logical_type, // aka "What this operation is doing"
const std::string& language, // The language the implementation is written in
const std::string& function, // The operation implementation
const NodeVector& args,
std::vector<std::tuple<element::Type, PartialShape>> outputs);
Passthrough(const std::string& logical_type, // aka "What this operation is doing"
const std::string& language, // The language the implementation is written in
......@@ -59,7 +54,7 @@ public:
void validate_and_infer_types() final;
std::shared_ptr<Node> copy_with_new_args(const NodeVector& new_args) const final;
std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& new_args) const final;
const std::string& logical_type() const { return m_logical_type; }
const std::string& language() const { return m_language; }
......
......@@ -230,7 +230,7 @@ TEST(serialize, passthrough)
"SerializationTest",
"Plain",
"Hello, world!",
NodeVector{},
OutputVector{},
std::vector<estuple>{estuple{element::f32, PartialShape{2, 3}},
estuple{element::i8, PartialShape{4, 5}}});
auto f = make_shared<Function>(NodeVector{std::make_shared<op::GetOutputElement>(p, 0),
......
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