Remove v0 multiply (#4221)

* Remove v0 multiply

* Fixed code style
This commit is contained in:
Ilya Churaev 2021-02-09 22:09:44 +03:00 committed by GitHub
parent 8da9d17059
commit 91f05008db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 0 additions and 78 deletions

View File

@ -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.

View File

@ -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;
@ -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);

View File

@ -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;

View File

@ -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)

View File

@ -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();