Skip to content

Commit

Permalink
Remove v0 multiply (#4221)
Browse files Browse the repository at this point in the history
* Remove v0 multiply

* Fixed code style
  • Loading branch information
ilyachur authored Feb 9, 2021
1 parent 8da9d17 commit 91f0500
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 78 deletions.
35 changes: 0 additions & 35 deletions ngraph/core/include/ngraph/op/multiply.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,41 +22,6 @@ namespace ngraph
{
namespace op
{
namespace v0
{
/// \brief Elementwise multiplication operation.
class NGRAPH_DEPRECATED(
"This operation is deprecated and will be removed soon. "
"Use v1::Multiply instead of it.") NGRAPH_API Multiply
: public util::BinaryElementwiseArithmetic
{
NGRAPH_SUPPRESS_DEPRECATED_START
public:
static constexpr NodeTypeInfo type_info{"Multiply", 0};
const NodeTypeInfo& get_type_info() const override { return type_info; }
/// \brief Constructs a multiplication operation.
Multiply()
: util::BinaryElementwiseArithmetic(AutoBroadcastSpec::NONE)
{
}
/// \brief Constructs a multiplication operation.
///
/// \param arg0 Node that produces the first input tensor.
/// \param arg1 Node that produces the second input tensor.
/// \param auto_broadcast Auto broadcast specification
Multiply(const Output<Node>& arg0,
const Output<Node>& arg1,
const AutoBroadcastSpec& auto_broadcast = AutoBroadcastSpec());

virtual std::shared_ptr<Node>
clone_with_new_inputs(const OutputVector& new_args) const override;

bool evaluate(const HostTensorVector& outputs,
const HostTensorVector& inputs) const override;
NGRAPH_SUPPRESS_DEPRECATED_END
};
} // namespace v0

namespace v1
{
/// \brief Elementwise multiplication operation.
Expand Down
28 changes: 0 additions & 28 deletions ngraph/core/src/op/multiply.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
#include "ngraph/runtime/host_tensor.hpp"
#include "ngraph/runtime/reference/multiply.hpp"

NGRAPH_SUPPRESS_DEPRECATED_START

using namespace std;
using namespace ngraph;

Expand Down Expand Up @@ -63,32 +61,6 @@ namespace multiplyop
}
}

// ------------------------------------ v0 -------------------------------------

constexpr NodeTypeInfo op::v0::Multiply::type_info;

op::v0::Multiply::Multiply(const Output<Node>& arg0,
const Output<Node>& arg1,
const AutoBroadcastSpec& auto_broadcast)
: BinaryElementwiseArithmetic(arg0, arg1, auto_broadcast)
{
constructor_validate_and_infer_types();
}

shared_ptr<Node> op::v0::Multiply::clone_with_new_inputs(const OutputVector& new_args) const
{
NGRAPH_OP_SCOPE(v0_Multiply_clone_with_new_inputs);
check_new_args_count(this, new_args);
return make_shared<op::v0::Multiply>(new_args.at(0), new_args.at(1), this->get_autob());
}

bool op::v0::Multiply::evaluate(const HostTensorVector& outputs,
const HostTensorVector& inputs) const
{
NGRAPH_OP_SCOPE(v0_Multiply_evaluate);
return multiplyop::evaluate_multiply(inputs[0], inputs[1], outputs[0], get_autob());
}

// ------------------------------------ v1 -------------------------------------

NGRAPH_RTTI_DEFINITION(op::v1::Multiply, "Multiply", 1, util::BinaryElementwiseArithmetic);
Expand Down
9 changes: 0 additions & 9 deletions ngraph/test/op_is.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -407,15 +407,6 @@ namespace
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
}

void op_is_Multiply()
{
op::v0::Multiply node;
EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node));
EXPECT_TRUE(op::is_binary_elementwise_arithmetic(&node));
EXPECT_FALSE(op::is_binary_elementwise_comparison(&node));
EXPECT_FALSE(op::is_binary_elementwise_logical(&node));
}

void op_is_NormalizeL2()
{
op::NormalizeL2 node;
Expand Down
1 change: 0 additions & 1 deletion ngraph/test/runtime/opset0_tbl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ NGRAPH_OP(Log, ngraph::op)
NGRAPH_OP(LRN, ngraph::op)
NGRAPH_OP(LSTMSequence, ngraph::op::v0)
NGRAPH_OP(MatMul, ngraph::op)
NGRAPH_OP(Multiply, ngraph::op::v0)
NGRAPH_OP(MVN, ngraph::op)
NGRAPH_OP(Negative, ngraph::op)
NGRAPH_OP(NormalizeL2, ngraph::op)
Expand Down
5 changes: 0 additions & 5 deletions ngraph/test/runtime/pass/opset1_upgrade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ namespace opset1_upgrade

// Default is that we didn nothing
shared_ptr<Node> op_cast(shared_ptr<Node> node) { return nullptr; }
shared_ptr<Node> op_cast(shared_ptr<op::v0::Multiply> node)
{
return op_cast_binary_elementwise_node<op::v0::Multiply, op::v1::Multiply>(node);
}

shared_ptr<Node> op_cast(shared_ptr<op::v0::ConvolutionBackpropData> node)
{
auto data_batch_shape = node->get_data_batch_shape();
Expand Down

0 comments on commit 91f0500

Please sign in to comment.