Deprecate nGraph v0 ops and builders (#1856)
* Deprecate nGraph v0 ops * Fixed build * Added deprecated defines to fix windows
This commit is contained in:
@@ -25,6 +25,8 @@
|
||||
#include <ngraph/log.hpp>
|
||||
#include <transformations/common_optimizations/nop_elimination.hpp>
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
|
||||
#include "common_test_utils/ngraph_test_utils.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace ngraph;
|
||||
using namespace std;
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@ namespace ngraph
|
||||
///
|
||||
/// \return Vector of broadcasted values.
|
||||
///
|
||||
NGRAPH_DEPRECATED("This builder was deprecated.")
|
||||
NGRAPH_API
|
||||
OutputVector numpy_broadcast_outputs(const OutputVector& values);
|
||||
|
||||
@@ -66,6 +67,7 @@ namespace ngraph
|
||||
///
|
||||
/// \return Node producing values with requested shape.
|
||||
///
|
||||
NGRAPH_DEPRECATED("This builder was deprecated.")
|
||||
NGRAPH_API
|
||||
std::shared_ptr<Node> numpy_broadcast(const Output<Node>& value, const Shape& shape);
|
||||
|
||||
@@ -97,6 +99,7 @@ namespace ngraph
|
||||
/// elements point to ngraph::Node objects whose output values have the same shape.
|
||||
///
|
||||
/// \exception ngraph::builder::numpy_autobroadcast_incompatible_shapes
|
||||
NGRAPH_DEPRECATED("This builder was deprecated.")
|
||||
NGRAPH_API
|
||||
std::pair<std::shared_ptr<Node>, std::shared_ptr<Node>>
|
||||
numpy_broadcast(const std::pair<Output<Node>, Output<Node>>& args);
|
||||
@@ -116,12 +119,14 @@ namespace ngraph
|
||||
///
|
||||
/// \exception ngraph::builder::numpy_autobroadcast_incompatible_shapes
|
||||
template <typename NodeType>
|
||||
std::shared_ptr<NodeType>
|
||||
make_with_numpy_broadcast(const Output<Node>& operand1_reshapeable,
|
||||
const Output<Node>& operand2_reshapeable)
|
||||
NGRAPH_DEPRECATED("This builder was deprecated.")
|
||||
std::shared_ptr<NodeType> make_with_numpy_broadcast(
|
||||
const Output<Node>& operand1_reshapeable, const Output<Node>& operand2_reshapeable)
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
auto shaped_op1_op2 = numpy_broadcast({operand1_reshapeable, operand2_reshapeable});
|
||||
return std::make_shared<NodeType>(shaped_op1_op2.first, shaped_op1_op2.second);
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
|
||||
/// Create a new \p NodeType node, and any additional nodes required to simulate NumPy-style
|
||||
@@ -143,13 +148,16 @@ namespace ngraph
|
||||
///
|
||||
/// \exception ngraph::builder::numpy_autobroadcast_incompatible_shapes
|
||||
template <typename NodeType>
|
||||
NGRAPH_DEPRECATED("This builder was deprecated.")
|
||||
std::shared_ptr<Node> make_with_numpy_broadcast(const Output<Node>& operand1,
|
||||
const Output<Node>& operand2_reshapeable,
|
||||
const Output<Node>& operand3_reshapeable)
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
auto shaped_op2_op3 = numpy_broadcast({operand2_reshapeable, operand3_reshapeable});
|
||||
return std::make_shared<NodeType>(
|
||||
operand1, shaped_op2_op3.first, shaped_op2_op3.second);
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
|
||||
/// \brief Broadcast shape of two nodes to make them compatible for a matrix
|
||||
@@ -168,6 +176,7 @@ namespace ngraph
|
||||
///
|
||||
/// \return The vector containing both outputs broadcasted.
|
||||
///
|
||||
NGRAPH_DEPRECATED("This builder was deprecated.")
|
||||
NGRAPH_API
|
||||
OutputVector numpy_broadcast_for_matmul_operation(const Output<Node>& left,
|
||||
const Output<Node>& right);
|
||||
@@ -179,6 +188,7 @@ namespace ngraph
|
||||
/// \param axis Index starting to align
|
||||
///
|
||||
/// \return pdpd-style broadcasted list of nodes.
|
||||
NGRAPH_DEPRECATED("This builder was deprecated.")
|
||||
NGRAPH_API
|
||||
OutputVector pdpd_broadcast(const OutputVector& inputs, int64_t axis);
|
||||
|
||||
@@ -196,6 +206,7 @@ namespace ngraph
|
||||
/// matches the desired new shape.
|
||||
///
|
||||
/// \return The indices of added axes.
|
||||
NGRAPH_DEPRECATED("This builder was deprecated.")
|
||||
NGRAPH_API
|
||||
AxisSet calculate_broadcast_axes(const Shape& output_shape,
|
||||
const Shape& input_shape,
|
||||
@@ -217,6 +228,7 @@ namespace ngraph
|
||||
/// \return A pair that contains the target shape as its first object and a vector of
|
||||
/// padded input shapes ready to be broadcasted as the second object
|
||||
///
|
||||
NGRAPH_DEPRECATED("This builder was deprecated.")
|
||||
NGRAPH_API
|
||||
std::pair<Shape, std::vector<Shape>>
|
||||
get_numpy_broadcast_shapes(const std::vector<Shape>& input_shapes);
|
||||
@@ -235,27 +247,36 @@ namespace ngraph
|
||||
/// \param input_shape The shape of input tensor.
|
||||
///
|
||||
/// \return The indices of added axes.
|
||||
NGRAPH_DEPRECATED("This builder was deprecated.")
|
||||
inline AxisSet calculate_broadcast_axes(const Shape& output_shape, const Shape& input_shape)
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
return calculate_broadcast_axes(
|
||||
output_shape, input_shape, output_shape.size() - input_shape.size());
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
|
||||
NGRAPH_DEPRECATED("This builder was deprecated.")
|
||||
inline std::shared_ptr<Node> make_broadcast_node(const Output<Node>& output,
|
||||
Shape new_shape)
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
return std::make_shared<op::Broadcast>(
|
||||
output, new_shape, calculate_broadcast_axes(new_shape, output.get_shape()));
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
|
||||
NGRAPH_DEPRECATED("This builder was deprecated.")
|
||||
inline std::shared_ptr<Node> make_broadcast_node(const Output<Node>& value,
|
||||
const Shape& new_shape,
|
||||
std::size_t start_match_axis)
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
return std::make_shared<op::Broadcast>(
|
||||
value,
|
||||
new_shape,
|
||||
calculate_broadcast_axes(new_shape, value.get_shape(), start_match_axis));
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
|
||||
namespace opset1
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "autobroadcast.hpp"
|
||||
#include "ngraph/node.hpp"
|
||||
#include "ngraph/op/broadcast.hpp"
|
||||
#include "ngraph/op/constant.hpp"
|
||||
@@ -110,7 +111,7 @@ namespace ngraph
|
||||
{
|
||||
axes.insert(i);
|
||||
}
|
||||
val = std::make_shared<ngraph::op::Broadcast>(val, shape, axes);
|
||||
val = builder::opset1::make_broadcast(val, shape, axes).get_node_shared_ptr();
|
||||
}
|
||||
|
||||
return val->add_provenance_group_members_above({});
|
||||
|
||||
@@ -22,13 +22,15 @@ namespace ngraph
|
||||
{
|
||||
namespace builder
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
/// \brief Factory class which generates an nGraph sub-graph performing MatMul operation.
|
||||
///
|
||||
/// This default implementation `MatmulFactory` creates a `MatMul` operation for
|
||||
/// floating-point data.
|
||||
/// Subclasses: `QLinearMatmulFactory` and `MatmulIntegerFactory` implement quantized
|
||||
/// versions.
|
||||
class NGRAPH_API MatmulFactory
|
||||
class NGRAPH_DEPRECATED("This builder was deprecated.") NGRAPH_API MatmulFactory
|
||||
{
|
||||
public:
|
||||
explicit MatmulFactory(const OutputVector& inputs)
|
||||
@@ -58,7 +60,8 @@ namespace ngraph
|
||||
|
||||
/// \brief Factory class which generates an nGraph sub-graph based on an ONNX QLinearMatMul
|
||||
/// operation.
|
||||
class NGRAPH_API QLinearMatmulFactory : public MatmulFactory
|
||||
class NGRAPH_DEPRECATED("This builder was deprecated.") NGRAPH_API QLinearMatmulFactory
|
||||
: public MatmulFactory
|
||||
{
|
||||
public:
|
||||
explicit QLinearMatmulFactory(const OutputVector& inputs)
|
||||
@@ -73,7 +76,8 @@ namespace ngraph
|
||||
|
||||
/// \brief Factory class which generates an nGraph sub-graph based on an ONNX MatMulInteger
|
||||
/// operation.
|
||||
class NGRAPH_API MatmulIntegerFactory : public MatmulFactory
|
||||
class NGRAPH_DEPRECATED("This builder was deprecated.") NGRAPH_API MatmulIntegerFactory
|
||||
: public MatmulFactory
|
||||
{
|
||||
public:
|
||||
explicit MatmulIntegerFactory(const OutputVector& inputs)
|
||||
@@ -84,5 +88,7 @@ namespace ngraph
|
||||
protected:
|
||||
Output<Node> make_dot(const Output<Node>& left, const Output<Node>& right) override;
|
||||
};
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
} // namespace builder
|
||||
} // namespace ngraph
|
||||
|
||||
@@ -31,6 +31,7 @@ namespace ngraph
|
||||
///
|
||||
/// \return The vector containing multiple nodes we split input node into.
|
||||
///
|
||||
NGRAPH_DEPRECATED("This builder was deprecated.")
|
||||
OutputVector split(const Output<Node>& value,
|
||||
const std::vector<size_t>& length_parts,
|
||||
size_t axis = 0);
|
||||
@@ -49,6 +50,7 @@ namespace ngraph
|
||||
///
|
||||
/// \return The vector containing multiple outputs we split input node into.
|
||||
///
|
||||
NGRAPH_DEPRECATED("This builder was deprecated.")
|
||||
NGRAPH_API
|
||||
OutputVector split(const Output<Node>& value, size_t split_parts, int axis = 0);
|
||||
|
||||
|
||||
@@ -28,8 +28,11 @@ namespace ngraph
|
||||
{
|
||||
/// \brief Elementwise addition operation.
|
||||
///
|
||||
class NGRAPH_API Add : public util::BinaryElementwiseArithmetic
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. Use v1::Add instead of it.")
|
||||
NGRAPH_API Add : public util::BinaryElementwiseArithmetic
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"Add", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -59,6 +62,7 @@ namespace ngraph
|
||||
bool visit_attributes(AttributeVisitor& visitor) override;
|
||||
bool evaluate(const HostTensorVector& outputs,
|
||||
const HostTensorVector& inputs) const override;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
} // namespace v0
|
||||
|
||||
@@ -102,9 +106,12 @@ namespace ngraph
|
||||
};
|
||||
|
||||
} // namespace v1
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::Add;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
} // namespace op
|
||||
|
||||
NGRAPH_DEPRECATED("This operator was deprecated and will be removed with v0 operation.")
|
||||
NGRAPH_API
|
||||
std::shared_ptr<Node> operator+(const Output<Node>& arg0, const Output<Node>& arg1);
|
||||
} // namespace ngraph
|
||||
|
||||
@@ -25,8 +25,11 @@ namespace ngraph
|
||||
namespace v0
|
||||
{
|
||||
/// \brief Logical "any" reduction operation.
|
||||
class NGRAPH_API Any : public util::LogicalReduction
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. Please don't use it.")
|
||||
NGRAPH_API Any : public util::LogicalReduction
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"Any", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -48,8 +51,11 @@ namespace ngraph
|
||||
bool visit_attributes(AttributeVisitor& visitor) override { return true; }
|
||||
/// \return The default value for Any.
|
||||
virtual std::shared_ptr<Node> get_default_value() const override;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
}
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::Any;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,9 +148,12 @@ namespace ngraph
|
||||
|
||||
namespace v0
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
/// \brief Operation which "adds" axes to an input tensor, replicating elements from the
|
||||
/// input as needed along the new axes.
|
||||
class NGRAPH_API Broadcast : public Op
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. "
|
||||
"Use v1::Broadcast instead of it.") NGRAPH_API Broadcast : public Op
|
||||
{
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"Broadcast", 0};
|
||||
@@ -195,7 +198,9 @@ namespace ngraph
|
||||
};
|
||||
|
||||
/// \brief Broadcast arg to the same shape as like_arg.
|
||||
class NGRAPH_API BroadcastLike : public v0::Broadcast
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. Please don't use it.")
|
||||
NGRAPH_API BroadcastLike : public v0::Broadcast
|
||||
{
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"BroadcastLike", 0};
|
||||
@@ -231,9 +236,12 @@ namespace ngraph
|
||||
protected:
|
||||
AxisSet m_initial_broadcast_axes;
|
||||
};
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
} // namespace v0
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::Broadcast;
|
||||
using v0::BroadcastLike;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,8 +30,11 @@ namespace ngraph
|
||||
/// Maps quantized input (q) to real output (r) using scale (s) and zero point
|
||||
/// (z):
|
||||
/// r = (q - o) * s
|
||||
class NGRAPH_API Dequantize : public ngraph::op::Op
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. Please do not use it.")
|
||||
NGRAPH_API Dequantize : public ngraph::op::Op
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"Dequantize", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -62,8 +65,11 @@ namespace ngraph
|
||||
private:
|
||||
element::Type m_type;
|
||||
AxisSet m_axes;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
}
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::Dequantize;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,8 +25,12 @@ namespace ngraph
|
||||
namespace v0
|
||||
{
|
||||
/// \brief Elementwise division operation.
|
||||
class NGRAPH_API Divide : public util::BinaryElementwiseArithmetic
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. "
|
||||
"Use v1::Divide instead of it.") NGRAPH_API Divide
|
||||
: public util::BinaryElementwiseArithmetic
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"Divide", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -65,6 +69,7 @@ namespace ngraph
|
||||
|
||||
protected:
|
||||
bool m_pythondiv{true};
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
} // namespace v0
|
||||
|
||||
@@ -117,9 +122,12 @@ namespace ngraph
|
||||
};
|
||||
} // namespace v1
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::Divide;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
} // namespace op
|
||||
|
||||
NGRAPH_DEPRECATED("This operator was deprecated and will be removed with v0 operation.")
|
||||
NGRAPH_API
|
||||
std::shared_ptr<Node> operator/(const Output<Node>& arg0, const Output<Node>& arg1);
|
||||
} // namespace ngraph
|
||||
|
||||
@@ -29,8 +29,11 @@ namespace ngraph
|
||||
/// \brief Generalized dot product operation, including scalar-tensor product,
|
||||
/// matrix-vector
|
||||
/// product, and matrix multiplication.
|
||||
class NGRAPH_API Dot : public Op
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. Please do not use it.")
|
||||
NGRAPH_API Dot : public Op
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"Dot", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -89,8 +92,11 @@ namespace ngraph
|
||||
protected:
|
||||
size_t m_reduction_axes_count;
|
||||
bool m_has_reduction_axes_count;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
}
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::Dot;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,8 +41,12 @@ namespace ngraph
|
||||
/// | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
/// | \f$\texttt{bool}[d_1,\dots,d_n]\f$ | The tensor \f$T\f$, where \f$T[i_1,\dots,i_n] = 1\text{ if }\texttt{arg0}[i_1,\dots,i_n] = \texttt{arg1}[i_1,\dots,i_n]\text{, else } 0\f$ |
|
||||
// clang-format on
|
||||
class NGRAPH_API Equal : public util::BinaryElementwiseComparison
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. "
|
||||
"Use v1::Equal instead of it.") NGRAPH_API Equal
|
||||
: public util::BinaryElementwiseComparison
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"Equal", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -65,6 +69,7 @@ namespace ngraph
|
||||
|
||||
bool evaluate(const HostTensorVector& outputs,
|
||||
const HostTensorVector& inputs) const override;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
} // namespace v0
|
||||
|
||||
@@ -114,6 +119,8 @@ namespace ngraph
|
||||
};
|
||||
} // namespace v1
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::Equal;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,8 +25,11 @@ namespace ngraph
|
||||
namespace v0
|
||||
{
|
||||
/// \brief Gather slices from axis of params according to indices
|
||||
class NGRAPH_API Gather : public Op
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. "
|
||||
"Use v1::Gather instead of it.") NGRAPH_API Gather : public Op
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"Gather", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -47,6 +50,7 @@ namespace ngraph
|
||||
|
||||
protected:
|
||||
size_t m_axis;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
}
|
||||
|
||||
@@ -81,6 +85,8 @@ namespace ngraph
|
||||
}
|
||||
|
||||
// latest stable opset version
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::Gather;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,8 +25,11 @@ namespace ngraph
|
||||
namespace v0
|
||||
{
|
||||
/// \brief Gather slices from params with shapes given by indices
|
||||
class NGRAPH_API GatherND : public Op
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. Please do not use it.")
|
||||
NGRAPH_API GatherND : public Op
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"GatherND", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -42,8 +45,11 @@ namespace ngraph
|
||||
void validate_and_infer_types() override;
|
||||
virtual std::shared_ptr<Node>
|
||||
clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
}
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::GatherND;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,8 +25,12 @@ namespace ngraph
|
||||
namespace v0
|
||||
{
|
||||
/// \brief Elementwise greater-than operation.
|
||||
class NGRAPH_API Greater : public util::BinaryElementwiseComparison
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. "
|
||||
"Use v1::Greater instead of it.") NGRAPH_API Greater
|
||||
: public util::BinaryElementwiseComparison
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"Greater", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -48,6 +52,7 @@ namespace ngraph
|
||||
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
|
||||
|
||||
@@ -80,6 +85,8 @@ namespace ngraph
|
||||
};
|
||||
} // namespace v1
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::Greater;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,8 +25,12 @@ namespace ngraph
|
||||
namespace v0
|
||||
{
|
||||
/// \brief Elementwise greater-than-or-equal operation.
|
||||
class NGRAPH_API GreaterEq : public util::BinaryElementwiseComparison
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. "
|
||||
"Use v1::GreaterEqual instead of it.") NGRAPH_API GreaterEq
|
||||
: public util::BinaryElementwiseComparison
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"GreaterEq", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -48,6 +52,7 @@ namespace ngraph
|
||||
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
|
||||
|
||||
@@ -78,11 +83,10 @@ namespace ngraph
|
||||
bool evaluate(const HostTensorVector& outputs,
|
||||
const HostTensorVector& inputs) const override;
|
||||
};
|
||||
|
||||
// DO NOT USE. Will be removed once users switch to GreaterEqual
|
||||
using GreaterEq = GreaterEqual;
|
||||
} // namespace v1
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::GreaterEq;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,8 +25,12 @@ namespace ngraph
|
||||
namespace v0
|
||||
{
|
||||
/// \brief Elementwise less-than operation.
|
||||
class NGRAPH_API Less : public util::BinaryElementwiseComparison
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. "
|
||||
"Use v1::Less instead of it.") NGRAPH_API Less
|
||||
: public util::BinaryElementwiseComparison
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"Less", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -48,6 +52,7 @@ namespace ngraph
|
||||
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
|
||||
|
||||
@@ -80,6 +85,8 @@ namespace ngraph
|
||||
};
|
||||
} // namespace v1
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::Less;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,8 +55,12 @@ namespace ngraph
|
||||
namespace v0
|
||||
{
|
||||
/// \brief Elementwise less-than-or-equal operation.
|
||||
class NGRAPH_API LessEq : public util::BinaryElementwiseComparison
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. "
|
||||
"Use v1::LessEqual instead of it.") NGRAPH_API LessEq
|
||||
: public util::BinaryElementwiseComparison
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"LessEq", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -78,9 +82,12 @@ namespace ngraph
|
||||
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
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::LessEq;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
} // namespace op
|
||||
} // namespace ngraph
|
||||
|
||||
@@ -26,8 +26,12 @@ namespace ngraph
|
||||
namespace v0
|
||||
{
|
||||
/// \brief Max-reduction operation.
|
||||
class NGRAPH_API Max : public util::ArithmeticReduction
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. "
|
||||
"Use v1::ReduceMax instead of it.") NGRAPH_API Max
|
||||
: public util::ArithmeticReduction
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"Max", 0};
|
||||
|
||||
@@ -55,6 +59,7 @@ namespace ngraph
|
||||
|
||||
bool evaluate(const HostTensorVector& outputs,
|
||||
const HostTensorVector& inputs) const override;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
}
|
||||
|
||||
@@ -84,6 +89,8 @@ namespace ngraph
|
||||
};
|
||||
}
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::Max;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,8 +25,12 @@ namespace ngraph
|
||||
namespace v0
|
||||
{
|
||||
/// \brief Elementwise maximum operation.
|
||||
class NGRAPH_API Maximum : public util::BinaryElementwiseArithmetic
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. "
|
||||
"Use v1::Maximum instead of it.") NGRAPH_API Maximum
|
||||
: public util::BinaryElementwiseArithmetic
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"Maximum", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -49,6 +53,7 @@ namespace ngraph
|
||||
|
||||
bool evaluate(const HostTensorVector& outputs,
|
||||
const HostTensorVector& inputs) const override;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
} // namespace v0
|
||||
|
||||
@@ -84,6 +89,8 @@ namespace ngraph
|
||||
};
|
||||
} // namespace v1
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::Maximum;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,8 +26,12 @@ namespace ngraph
|
||||
namespace v0
|
||||
{
|
||||
/// \brief Min-reduction operation.
|
||||
class NGRAPH_API Min : public util::ArithmeticReduction
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. "
|
||||
"Use v1::ReduceMin instead of it.") NGRAPH_API Min
|
||||
: public util::ArithmeticReduction
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"Min", 0};
|
||||
|
||||
@@ -55,6 +59,7 @@ namespace ngraph
|
||||
|
||||
bool evaluate(const HostTensorVector& outputs,
|
||||
const HostTensorVector& inputs) const override;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
}
|
||||
|
||||
@@ -84,6 +89,8 @@ namespace ngraph
|
||||
};
|
||||
}
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::Min;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,8 +25,12 @@ namespace ngraph
|
||||
namespace v0
|
||||
{
|
||||
/// \brief Elementwise minimum operation.
|
||||
class NGRAPH_API Minimum : public util::BinaryElementwiseArithmetic
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. "
|
||||
"Use v1::Minimum instead of it.") NGRAPH_API Minimum
|
||||
: public util::BinaryElementwiseArithmetic
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"Minimum", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -49,6 +53,7 @@ namespace ngraph
|
||||
|
||||
bool evaluate(const HostTensorVector& outputs,
|
||||
const HostTensorVector& inputs) const override;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
} // namespace v0
|
||||
|
||||
@@ -84,6 +89,8 @@ namespace ngraph
|
||||
};
|
||||
} // namespace v1
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::Minimum;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,8 +25,12 @@ namespace ngraph
|
||||
namespace v0
|
||||
{
|
||||
/// \brief Elementwise multiplication operation.
|
||||
class NGRAPH_API Multiply : public util::BinaryElementwiseArithmetic
|
||||
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; }
|
||||
@@ -49,6 +53,7 @@ namespace ngraph
|
||||
|
||||
bool evaluate(const HostTensorVector& outputs,
|
||||
const HostTensorVector& inputs) const override;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
} // namespace v0
|
||||
|
||||
@@ -84,9 +89,12 @@ namespace ngraph
|
||||
};
|
||||
} // namespace v1
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::Multiply;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
} // namespace op
|
||||
|
||||
NGRAPH_DEPRECATED("This operator was deprecated and will be removed with v0 operation.")
|
||||
NGRAPH_API
|
||||
std::shared_ptr<Node> operator*(const Output<Node>& arg0, const Output<Node>& arg1);
|
||||
} // namespace ngraph
|
||||
|
||||
@@ -48,8 +48,11 @@ namespace ngraph
|
||||
namespace v0
|
||||
{
|
||||
/// \brief Elementwise logical negation operation.
|
||||
class NGRAPH_API Not : public Op
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. "
|
||||
"Use v1::LogicalNot instead of it.") NGRAPH_API Not : public Op
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"Not", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -66,9 +69,12 @@ namespace ngraph
|
||||
clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
bool evaluate(const HostTensorVector& outputs,
|
||||
const HostTensorVector& inputs) const override;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
}
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::Not;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
} // namespace op
|
||||
} // namespace ngraph
|
||||
|
||||
@@ -25,8 +25,12 @@ namespace ngraph
|
||||
namespace v0
|
||||
{
|
||||
/// \brief Elementwise not-equal operation.
|
||||
class NGRAPH_API NotEqual : public util::BinaryElementwiseComparison
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. "
|
||||
"Use v1::NotEqual instead of it.") NGRAPH_API NotEqual
|
||||
: public util::BinaryElementwiseComparison
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"NotEqual", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -49,6 +53,7 @@ namespace ngraph
|
||||
|
||||
bool evaluate(const HostTensorVector& outputs,
|
||||
const HostTensorVector& inputs) const override;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
} // namespace v0
|
||||
|
||||
@@ -82,6 +87,8 @@ namespace ngraph
|
||||
};
|
||||
} // namespace v1
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::NotEqual;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,8 +46,11 @@ namespace ngraph
|
||||
/// | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
/// | \f$E[d_1,\dots,d_n]\f$ | The tensor \f$T'\f$, where \f$T'[i_1,\dots,i_{m-1},i_m,i_{m+1},\dots,i_n] = 1\f$ if \f$T[i_1,\dots,i_{m-1},i_{m+1},\dots,i_n] = i_m\f$, else \f$0\f$. However, \f$T'\f$ is undefined if any non-integral value or any out-of-bounds value is detected in the input tensor. |
|
||||
// clang-format on
|
||||
class NGRAPH_API OneHot : public Op
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. "
|
||||
"Use v1::OneHot instead of it.") NGRAPH_API OneHot : public Op
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"OneHot", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -71,6 +74,7 @@ namespace ngraph
|
||||
protected:
|
||||
PartialShape m_shape;
|
||||
size_t m_one_hot_axis;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
}
|
||||
namespace v1
|
||||
@@ -111,6 +115,8 @@ namespace ngraph
|
||||
};
|
||||
}
|
||||
// default opset version
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::OneHot;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
#define NGRAPH_OP(NAME, NAMESPACE, VERSION)
|
||||
#endif
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
NGRAPH_OP(Abs, ngraph::op::v0, 0)
|
||||
NGRAPH_OP(Acos, ngraph::op::v0, 0)
|
||||
NGRAPH_OP(Acosh, ngraph::op::v3, 3)
|
||||
@@ -132,7 +134,6 @@ NGRAPH_OP(PSROIPooling, ngraph::op::v0, 0)
|
||||
NGRAPH_OP(Pad, ngraph::op::v0, 0)
|
||||
NGRAPH_OP(Pad, ngraph::op::v1, 1)
|
||||
NGRAPH_OP(Parameter, ngraph::op::v0, 0)
|
||||
NGRAPH_OP(Passthrough, ngraph::op::v0, 0)
|
||||
NGRAPH_OP(Power, ngraph::op::v0, 0)
|
||||
NGRAPH_OP(Power, ngraph::op::v1, 1)
|
||||
NGRAPH_OP(PriorBox, ngraph::op::v0, 0)
|
||||
@@ -203,3 +204,5 @@ NGRAPH_OP(VariadicSplit, ngraph::op::v1, 1)
|
||||
NGRAPH_OP(Xor, ngraph::op::v0, 0)
|
||||
NGRAPH_OP(Assign, ngraph::op::v3, 3)
|
||||
NGRAPH_OP(ReadValue, ngraph::op::v3, 3)
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
|
||||
@@ -59,8 +59,12 @@ namespace ngraph
|
||||
{
|
||||
/// \brief Elementwise logical-or operation.
|
||||
///
|
||||
class NGRAPH_API Or : public util::BinaryElementwiseLogical
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. "
|
||||
"Use v1::LogicalOr instead of it.") NGRAPH_API Or
|
||||
: public util::BinaryElementwiseLogical
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"Or", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -84,9 +88,12 @@ namespace ngraph
|
||||
|
||||
bool evaluate(const HostTensorVector& outputs,
|
||||
const HostTensorVector& inputs) const override;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
} // namespace v0
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::Or;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
} // namespace op
|
||||
} // namespace ngraph
|
||||
|
||||
@@ -27,8 +27,11 @@ namespace ngraph
|
||||
namespace v0
|
||||
{
|
||||
/// \brief Generic padding operation.
|
||||
class NGRAPH_API Pad : public Op
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. Use v1::Pad instead of it.")
|
||||
NGRAPH_API Pad : public Op
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"Pad", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -85,6 +88,7 @@ namespace ngraph
|
||||
CoordinateDiff m_padding_above;
|
||||
Shape m_padding_interior_fake; // LEGACY: This is all zeros.
|
||||
PadMode m_pad_mode;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
}
|
||||
|
||||
@@ -157,6 +161,8 @@ namespace ngraph
|
||||
}
|
||||
|
||||
// latest stable opset version
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::Pad;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
//*****************************************************************************
|
||||
// Copyright 2017-2020 Intel Corporation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//*****************************************************************************
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <vector>
|
||||
|
||||
#include "ngraph/op/op.hpp"
|
||||
|
||||
namespace ngraph
|
||||
{
|
||||
namespace op
|
||||
{
|
||||
namespace v0
|
||||
{
|
||||
/// An op directly representing backend-specific code.
|
||||
///
|
||||
/// N.B. Not all backends support all operation languages; a
|
||||
/// given backend might only support a given passthrough
|
||||
/// operation language in certain modes.
|
||||
class Passthrough;
|
||||
}
|
||||
using v0::Passthrough;
|
||||
}
|
||||
}
|
||||
|
||||
class NGRAPH_API ngraph::op::v0::Passthrough final : public Op
|
||||
{
|
||||
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 OutputVector& args,
|
||||
std::vector<std::tuple<element::Type, PartialShape>> outputs);
|
||||
|
||||
void validate_and_infer_types() 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; }
|
||||
const std::string& function() const { return m_function; }
|
||||
const std::vector<std::tuple<element::Type, PartialShape>>& output_shapes() const
|
||||
{
|
||||
return m_output_shapes;
|
||||
}
|
||||
|
||||
private:
|
||||
std::string m_logical_type;
|
||||
std::string m_language;
|
||||
std::string m_function;
|
||||
std::vector<std::tuple<element::Type, PartialShape>> m_output_shapes;
|
||||
};
|
||||
@@ -40,8 +40,12 @@ namespace ngraph
|
||||
/// | ---------------------- | -------------------------------------------------------------------------------------------------------------- |
|
||||
/// | \f$N[d_1,\dots,d_n]\f$ | The tensor \f$T\f$, where \f$T[i_1,\dots,i_n] = \texttt{arg0}[i_1,\dots,i_n]^{\texttt{arg1}[i_1,\dots,i_n]}\f$ |
|
||||
// clang-format on
|
||||
class NGRAPH_API Power : public util::BinaryElementwiseArithmetic
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. "
|
||||
"Use v1::Power instead of it.") NGRAPH_API Power
|
||||
: public util::BinaryElementwiseArithmetic
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"Power", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -62,6 +66,7 @@ namespace ngraph
|
||||
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
|
||||
|
||||
@@ -110,6 +115,8 @@ namespace ngraph
|
||||
};
|
||||
} // namespace v1
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::Power;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,8 +27,12 @@ namespace ngraph
|
||||
/// \brief Product reduction operation.
|
||||
///
|
||||
/// Reduces the tensor, eliminating the specified reduction axes by taking the product.
|
||||
class NGRAPH_API Product : public util::ArithmeticReduction
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. "
|
||||
"Use v1::ReduceProd instead of it.") NGRAPH_API Product
|
||||
: public util::ArithmeticReduction
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"Product", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -53,9 +57,12 @@ namespace ngraph
|
||||
|
||||
bool evaluate(const HostTensorVector& outputs,
|
||||
const HostTensorVector& inputs) const override;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
}
|
||||
// default opset version
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::Product;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,8 +30,11 @@ namespace ngraph
|
||||
/// Maps real input (r) to quantized output (q) using scale (s), zero point (z)
|
||||
/// and
|
||||
/// round mode: q = ROUND(r / s) + o
|
||||
class NGRAPH_API Quantize : public ngraph::op::Op
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. Please do not use it.")
|
||||
NGRAPH_API Quantize : public ngraph::op::Op
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"Quantize", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -107,8 +110,11 @@ namespace ngraph
|
||||
ngraph::element::Type m_type;
|
||||
ngraph::AxisSet m_axes;
|
||||
RoundMode m_round_mode;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
}
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::Quantize;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,8 +25,11 @@ namespace ngraph
|
||||
{
|
||||
namespace v0
|
||||
{
|
||||
class NGRAPH_API QuantizedConvolution : public Op
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. Please do not use it.")
|
||||
NGRAPH_API QuantizedConvolution : public Op
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"QuantizedConvolution", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -103,8 +106,11 @@ namespace ngraph
|
||||
ngraph::AxisSet m_input_axes;
|
||||
ngraph::AxisSet m_filter_axes;
|
||||
ngraph::AxisSet m_output_axes;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
}
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::QuantizedConvolution;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,8 +24,11 @@ namespace ngraph
|
||||
{
|
||||
namespace v0
|
||||
{
|
||||
class NGRAPH_API QuantizedDot : public Op
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. Please do not use it.")
|
||||
NGRAPH_API QuantizedDot : public Op
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"QuantizedDot", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -80,8 +83,11 @@ namespace ngraph
|
||||
ngraph::AxisSet m_input0_axes;
|
||||
ngraph::AxisSet m_input1_axes;
|
||||
ngraph::AxisSet m_output_axes;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
}
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::QuantizedDot;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,8 +52,11 @@ namespace ngraph
|
||||
/// | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
/// | \f$E[d_1,\dots,d_n]\f$ | The tensor \f$T\f$ where \f$T[i_1,\dots,i_n] = \texttt{arg1}[j_1,\dots,j_n]\f$ if \f$j_1,\dots,j_n\f$ is in bounds for `arg1` and for all \f$m\f$, \f$i_m = l_m + j_m s_m\f$, otherwise \f$\texttt{arg0}[i_1,\dots,i_n]\f$. |
|
||||
// clang-format on
|
||||
class NGRAPH_API ReplaceSlice : public Op
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. Please do not use it.")
|
||||
NGRAPH_API ReplaceSlice : public Op
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"ReplaceSlice", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -109,8 +112,11 @@ namespace ngraph
|
||||
Coordinate m_lower_bounds;
|
||||
Coordinate m_upper_bounds;
|
||||
Strides m_strides;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
}
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::ReplaceSlice;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,8 +65,11 @@ namespace ngraph
|
||||
/// | ------------------------ | ------------------------------------------------------------------------------------------------------ |
|
||||
/// | \f$E[d'_1,\dots,d'_m]\f$ | The tensor \f$T\f$, where \f$T\f$ is the input tensor with its elements rearranged as described above. |
|
||||
// clang-format on
|
||||
class NGRAPH_API Reshape : public Op
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. "
|
||||
"Use v1::Reshape instead of it.") NGRAPH_API Reshape : public Op
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"Reshape", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -108,6 +111,7 @@ namespace ngraph
|
||||
AxisVector m_input_order;
|
||||
Shape m_output_shape;
|
||||
bool m_is_transpose{false};
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
}
|
||||
|
||||
@@ -154,6 +158,8 @@ namespace ngraph
|
||||
bool m_special_zero;
|
||||
};
|
||||
}
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::Reshape;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,8 +48,11 @@ namespace ngraph
|
||||
/// | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
/// | \f$E[d_1,\dots,d_n]\f$ | The tensor \f$T\f$, where \f$T[i_1,\dots,i_n] = \texttt{arg}[j_1,\dots,j_n]\f$ and \f$j_k = d_k - i_k - 1\f$ if axis \f$k\f$ is in the reverse set; else \f$j_k = i_k\f$. |
|
||||
// clang-format on
|
||||
class NGRAPH_API Reverse : public Op
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. "
|
||||
"Use v1::Reverse instead of it.") NGRAPH_API Reverse : public Op
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"Reverse", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -76,6 +79,7 @@ namespace ngraph
|
||||
|
||||
protected:
|
||||
AxisSet m_reversed_axes;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
}
|
||||
|
||||
@@ -133,7 +137,9 @@ namespace ngraph
|
||||
};
|
||||
}
|
||||
// default opset version
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::Reverse;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
|
||||
NGRAPH_API
|
||||
|
||||
@@ -25,8 +25,11 @@ namespace ngraph
|
||||
namespace v0
|
||||
{
|
||||
/// \brief Elementwise round operation.
|
||||
class NGRAPH_API Round : public util::UnaryElementwiseArithmetic
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. Please do not use it.")
|
||||
NGRAPH_API Round : public util::UnaryElementwiseArithmetic
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"Round", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -45,8 +48,11 @@ namespace ngraph
|
||||
|
||||
bool evaluate(const HostTensorVector& outputs,
|
||||
const HostTensorVector& inputs) const override;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
}
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::Round;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,83 +0,0 @@
|
||||
//*****************************************************************************
|
||||
// Copyright 2017-2020 Intel Corporation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//*****************************************************************************
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ngraph/op/op.hpp"
|
||||
#include "ngraph/op/util/scatter_base.hpp"
|
||||
|
||||
namespace ngraph
|
||||
{
|
||||
namespace op
|
||||
{
|
||||
namespace v0
|
||||
{
|
||||
/// \brief Add updates to slices from inputs addressed by indices
|
||||
class NGRAPH_API ScatterAdd : public Op
|
||||
{
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"ScatterAdd", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
ScatterAdd() = default;
|
||||
/// \param inputs Tensor
|
||||
/// \param indices Index tensor: Data type must be `element::i32` or `element::i64`
|
||||
/// \param updates Tensor: Must have same type as inputs
|
||||
ScatterAdd(const Output<Node>& inputs,
|
||||
const Output<Node>& indices,
|
||||
const Output<Node>& updates)
|
||||
: Op({inputs, indices, updates})
|
||||
{
|
||||
constructor_validate_and_infer_types();
|
||||
}
|
||||
|
||||
void validate_and_infer_types() override;
|
||||
virtual std::shared_ptr<Node>
|
||||
clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
};
|
||||
}
|
||||
|
||||
namespace v3
|
||||
{
|
||||
///
|
||||
/// \brief Add updates to slices from inputs addressed by indices
|
||||
///
|
||||
class NGRAPH_API ScatterAdd : public util::ScatterBase
|
||||
{
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"ScatterAdd", 3};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
ScatterAdd() = default;
|
||||
|
||||
///
|
||||
/// \brief Constructs ScatterAdd object.
|
||||
///
|
||||
/// \param data The input tensor to be updated.
|
||||
/// \param indices The tensor with indexes which will be updated.
|
||||
/// \param updates The tensor with update values.
|
||||
/// \param[in] axis The axis at which elements will be updated.
|
||||
///
|
||||
ScatterAdd(const Output<Node>& data,
|
||||
const Output<Node>& indices,
|
||||
const Output<Node>& updates,
|
||||
const Output<Node>& axis);
|
||||
|
||||
virtual std::shared_ptr<Node>
|
||||
clone_with_new_inputs(const OutputVector& inputs) const override;
|
||||
};
|
||||
}
|
||||
using v0::ScatterAdd;
|
||||
}
|
||||
}
|
||||
@@ -41,8 +41,11 @@ namespace ngraph
|
||||
/// | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
/// | \f$E[d_1,\dots,d_n]\f$ | The tensor \f$T\f$, where \f$T[i_1,\dots,i_n] = \texttt{arg1}[i_1,\dots,i_n]\text{ if }\texttt{arg0}[i_1,\dots,i_n] \neq 0\text{, else }\texttt{arg2}[i_1,\dots,i_n]\f$ |
|
||||
// clang-format on
|
||||
class NGRAPH_API Select : public Op
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. "
|
||||
"Use v1::Select instead of it.") NGRAPH_API Select : public Op
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"Select", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -60,6 +63,7 @@ namespace ngraph
|
||||
virtual std::shared_ptr<Node>
|
||||
clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
void validate_and_infer_types() override;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
}
|
||||
|
||||
@@ -122,6 +126,8 @@ namespace ngraph
|
||||
AutoBroadcastSpec m_auto_broadcast;
|
||||
};
|
||||
}
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::Select;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,8 +28,11 @@ namespace ngraph
|
||||
{
|
||||
/// \brief Takes a slice of an input tensor, i.e., the sub-tensor that resides within a
|
||||
/// bounding box, optionally with stride.
|
||||
class NGRAPH_API Slice : public Op
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. Please do not use it.")
|
||||
NGRAPH_API Slice : public Op
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"Slice", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -75,9 +78,12 @@ namespace ngraph
|
||||
Coordinate m_lower_bounds;
|
||||
Coordinate m_upper_bounds;
|
||||
Strides m_strides;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
}
|
||||
// default opset version
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::Slice;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,8 +26,11 @@ namespace ngraph
|
||||
{
|
||||
/// \brief Softmax operation.
|
||||
///
|
||||
class NGRAPH_API Softmax : public Op
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. "
|
||||
"Use v1::Softmax instead of it.") NGRAPH_API Softmax : public Op
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"Softmax", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -63,6 +66,7 @@ namespace ngraph
|
||||
|
||||
bool evaluate(const HostTensorVector& outputs,
|
||||
const HostTensorVector& inputs) const override;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
}
|
||||
|
||||
@@ -105,6 +109,8 @@ namespace ngraph
|
||||
}
|
||||
|
||||
// default opset version
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::Softmax;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,8 +31,11 @@ namespace ngraph
|
||||
namespace v0
|
||||
{
|
||||
/// \brief Splits the input tensor into a list of smaller tensors ("pieces")
|
||||
class NGRAPH_API Split : public ngraph::op::util::FusedOp
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. "
|
||||
"Use v1::Split instead of it.") NGRAPH_API Split : public ngraph::op::util::FusedOp
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"Split", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -76,6 +79,7 @@ namespace ngraph
|
||||
size_t m_num_split;
|
||||
/// contains lengths of chunks that the input tensor will be split into
|
||||
std::vector<size_t> m_splits;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
}
|
||||
|
||||
@@ -112,7 +116,9 @@ namespace ngraph
|
||||
};
|
||||
}
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::Split;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,8 +25,11 @@ namespace ngraph
|
||||
namespace v0
|
||||
{
|
||||
/// \brief create StopGrdient op
|
||||
class NGRAPH_API StopGradient : public util::UnaryElementwiseArithmetic
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. Please do not use it.")
|
||||
NGRAPH_API StopGradient : public util::UnaryElementwiseArithmetic
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"StopGradient", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -38,8 +41,11 @@ namespace ngraph
|
||||
|
||||
virtual std::shared_ptr<Node>
|
||||
clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
}
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::StopGradient;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,8 +25,12 @@ namespace ngraph
|
||||
namespace v0
|
||||
{
|
||||
/// \brief Elementwise subtraction operation.
|
||||
class NGRAPH_API Subtract : public util::BinaryElementwiseArithmetic
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. "
|
||||
"Use v1::Subtract instead of it.") NGRAPH_API Subtract
|
||||
: public util::BinaryElementwiseArithmetic
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{"Subtract", 0};
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -49,6 +53,7 @@ namespace ngraph
|
||||
|
||||
bool evaluate(const HostTensorVector& outputs,
|
||||
const HostTensorVector& inputs) const override;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
|
||||
} // namespace v0
|
||||
@@ -83,9 +88,12 @@ namespace ngraph
|
||||
};
|
||||
} // namespace v1
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::Subtract;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
} // namespace op
|
||||
|
||||
NGRAPH_DEPRECATED("This operator was deprecated and will be removed with v0 operation.")
|
||||
NGRAPH_API
|
||||
std::shared_ptr<ngraph::Node> operator-(const Output<ngraph::Node> arg0,
|
||||
const Output<ngraph::Node> arg1);
|
||||
|
||||
@@ -74,8 +74,10 @@ namespace ngraph
|
||||
/// | ----------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
||||
/// | \f$N[\textit{delete}(A,d_1,\dots,d_n)]\f$ | The tensor \f$T\f$, where \f$T\f$ is the input tensor with the `reduction_axes` \f$A\f$ eliminated by summation. |
|
||||
// clang-format off
|
||||
class NGRAPH_API Sum : public util::ArithmeticReduction
|
||||
class NGRAPH_DEPRECATED("This operation is deprecated and will be removed soon. "
|
||||
"Use v1::ReduceSum instead of it.") NGRAPH_API Sum : public util::ArithmeticReduction
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
static constexpr NodeTypeInfo type_info{ "Sum", 0 };
|
||||
const NodeTypeInfo& get_type_info() const override { return type_info; }
|
||||
@@ -100,9 +102,12 @@ namespace ngraph
|
||||
|
||||
bool evaluate(const HostTensorVector& outputs,
|
||||
const HostTensorVector& inputs) const override;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
}
|
||||
// default opset version
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::Sum;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,8 +30,11 @@ namespace ngraph
|
||||
{
|
||||
// \brief Computes indices of top k maximum/minimum index along a specified axis for a
|
||||
// given tensor
|
||||
class NGRAPH_API TopK : public Op
|
||||
class NGRAPH_DEPRECATED(
|
||||
"This operation is deprecated and will be removed soon. "
|
||||
"Use v1::TopK instead of it.") NGRAPH_API TopK : public Op
|
||||
{
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
using SortType = TopKSortType;
|
||||
|
||||
@@ -112,6 +115,7 @@ namespace ngraph
|
||||
Shape compute_output_shape(const Shape input_shape,
|
||||
const int64_t k,
|
||||
const size_t axis) const;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
} // namespace v0
|
||||
|
||||
@@ -258,6 +262,8 @@ namespace ngraph
|
||||
};
|
||||
} // namespace v3
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
using v0::TopK;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
} // op
|
||||
} // ngraph
|
||||
|
||||
@@ -103,7 +103,6 @@
|
||||
#include "ngraph/op/or.hpp"
|
||||
#include "ngraph/op/pad.hpp"
|
||||
#include "ngraph/op/parameter.hpp"
|
||||
#include "ngraph/op/passthrough.hpp"
|
||||
#include "ngraph/op/power.hpp"
|
||||
#include "ngraph/op/prelu.hpp"
|
||||
#include "ngraph/op/prior_box.hpp"
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#include "ngraph/runtime/reference/dot.hpp"
|
||||
#include "ngraph/shape_util.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace ngraph
|
||||
@@ -272,3 +274,5 @@ namespace ngraph
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
#include "ngraph/op/quantize.hpp"
|
||||
#include "ngraph/shape_util.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
namespace ngraph
|
||||
{
|
||||
namespace runtime
|
||||
@@ -118,3 +120,5 @@ namespace ngraph
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#include "ngraph/coordinate_transform.hpp"
|
||||
#include "ngraph/op/topk.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
namespace ngraph
|
||||
{
|
||||
namespace runtime
|
||||
@@ -173,3 +175,5 @@ namespace ngraph
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#include "ngraph/op/reshape.hpp"
|
||||
#include "ngraph/util.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace ngraph
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
#include "ngraph/op/reshape.hpp"
|
||||
#include "ngraph/op/slice.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace ngraph;
|
||||
using namespace std;
|
||||
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
#include "ngraph/op/slice.hpp"
|
||||
#include "ngraph/opsets/opset1.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace ngraph;
|
||||
|
||||
namespace
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
#include "ngraph/rt_info.hpp"
|
||||
#include "ngraph/util.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
#include "ngraph/runtime/host_tensor.hpp"
|
||||
#include "ngraph/runtime/reference/add.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
#include "ngraph/op/any.hpp"
|
||||
#include "ngraph/graph_util.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
#include "ngraph/runtime/host_tensor.hpp"
|
||||
#include "ngraph/runtime/reference/broadcast.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
#include "ngraph/op/dequantize.hpp"
|
||||
#include "ngraph/shape_util.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#include "ngraph/runtime/host_tensor.hpp"
|
||||
#include "ngraph/runtime/reference/divide.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#include "ngraph/op/reshape.hpp"
|
||||
#include "ngraph/shape.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
#include "ngraph/runtime/host_tensor.hpp"
|
||||
#include "ngraph/runtime/reference/equal.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
|
||||
#include <limits>
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
#include "ngraph/op/gather_nd.hpp"
|
||||
#include "ngraph/shape.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
#include "ngraph/runtime/host_tensor.hpp"
|
||||
#include "ngraph/runtime/reference/greater.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
#include "ngraph/runtime/host_tensor.hpp"
|
||||
#include "ngraph/runtime/reference/greater_eq.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
#include "ngraph/runtime/host_tensor.hpp"
|
||||
#include "ngraph/runtime/reference/less.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
#include "ngraph/runtime/host_tensor.hpp"
|
||||
#include "ngraph/runtime/reference/less_eq.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#include "ngraph/runtime/reference/max.hpp"
|
||||
#include "ngraph/shape_util.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#include "ngraph/runtime/reference/maximum.hpp"
|
||||
#include "ngraph/type/element_type.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#include "ngraph/runtime/reference/min.hpp"
|
||||
#include "ngraph/shape_util.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#include "ngraph/runtime/reference/minimum.hpp"
|
||||
#include "ngraph/type/element_type.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
#include "ngraph/runtime/host_tensor.hpp"
|
||||
#include "ngraph/runtime/reference/multiply.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#include "ngraph/runtime/host_tensor.hpp"
|
||||
#include "ngraph/runtime/reference/not.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace ngraph;
|
||||
using namespace std;
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
#include "ngraph/runtime/host_tensor.hpp"
|
||||
#include "ngraph/runtime/reference/not_equal.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
#include "ngraph/op/util/op_types.hpp"
|
||||
#include "ngraph/validation_util.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
#include "ngraph/runtime/host_tensor.hpp"
|
||||
#include "ngraph/runtime/reference/or.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
#include "ngraph/op/util/op_types.hpp"
|
||||
#include "ngraph/runtime/reference/pad.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
//*****************************************************************************
|
||||
// Copyright 2017-2020 Intel Corporation
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//*****************************************************************************
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "ngraph/op/passthrough.hpp"
|
||||
|
||||
using namespace std;
|
||||
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 OutputVector& 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();
|
||||
}
|
||||
|
||||
void ngraph::op::Passthrough::validate_and_infer_types()
|
||||
{
|
||||
// N.B. It would be useful to have the backend deduce the output
|
||||
// shapes, instead of having them passed in via the
|
||||
// constructor and trusting that they're correct.
|
||||
//
|
||||
// The primary barrier to doing so is that at the point where
|
||||
// Passthrough ops are being constructed, we don't
|
||||
// necessarily have the backend available.
|
||||
//
|
||||
// At some point, we may want to add higher-level
|
||||
// backend-specific APIs for constructing Passthrough
|
||||
// operations; that would ensure that the backend can
|
||||
// understand the language being used, and would allow the
|
||||
// backend to infer the output shapes as needed.
|
||||
|
||||
std::size_t idx = 0;
|
||||
for (auto& output_shape : m_output_shapes)
|
||||
{
|
||||
set_output_type(idx++, std::get<0>(output_shape), std::get<1>(output_shape));
|
||||
}
|
||||
}
|
||||
|
||||
std::shared_ptr<ngraph::Node>
|
||||
ngraph::op::Passthrough::clone_with_new_inputs(const OutputVector& new_args) const
|
||||
{
|
||||
if (new_args.size() != get_input_size())
|
||||
{
|
||||
throw ngraph_error{
|
||||
"Passthrough node input counts cannot be changed for a given Passthrough function"};
|
||||
}
|
||||
return std::make_shared<Passthrough>(
|
||||
m_logical_type, m_language, m_function, new_args, m_output_shapes);
|
||||
}
|
||||
@@ -22,6 +22,8 @@
|
||||
#include "ngraph/runtime/host_tensor.hpp"
|
||||
#include "ngraph/runtime/reference/power.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#include "ngraph/runtime/reference/product.hpp"
|
||||
#include "ngraph/shape_util.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
#include "ngraph/op/quantize.hpp"
|
||||
#include "ngraph/shape_util.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
#include "ngraph/coordinate_diff.hpp"
|
||||
#include "ngraph/validation_util.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
#include "ngraph/util.hpp"
|
||||
#include "ngraph/validation_util.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
#include "ngraph/op/constant.hpp"
|
||||
#include "ngraph/op/slice.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#include "ngraph/runtime/opt_kernel/reshape.hpp"
|
||||
#include "ngraph/runtime/reference/reshape.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#include "ngraph/op/util/op_types.hpp"
|
||||
#include "ngraph/runtime/reference/reverse.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#include "ngraph/runtime/reference/copy.hpp"
|
||||
#include "ngraph/runtime/reference/round.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#include "ngraph/op/not.hpp"
|
||||
#include "ngraph/op/select.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
#include "ngraph/runtime/host_tensor.hpp"
|
||||
#include "ngraph/runtime/reference/slice.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
#include "ngraph/runtime/reference/softmax.hpp"
|
||||
#include "ngraph/util.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#include "ngraph/runtime/host_tensor.hpp"
|
||||
#include "ngraph/runtime/reference/slice.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
#include "ngraph/op/stop_gradient.hpp"
|
||||
#include "ngraph/op/broadcast.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
#include "ngraph/runtime/host_tensor.hpp"
|
||||
#include "ngraph/runtime/reference/subtract.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
#include "ngraph/runtime/reference/sum.hpp"
|
||||
#include "ngraph/shape_util.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#include "ngraph/runtime/host_tensor.hpp"
|
||||
#include "ngraph/runtime/reference/topk.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
|
||||
@@ -35,6 +35,8 @@
|
||||
#include "ngraph/op/xor.hpp"
|
||||
#include "ngraph/type.hpp"
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
|
||||
bool ngraph::op::is_unary_elementwise_arithmetic(const ngraph::Node* node)
|
||||
{
|
||||
return dynamic_cast<const ngraph::op::util::UnaryElementwiseArithmetic*>(node) != nullptr;
|
||||
|
||||
@@ -92,19 +92,17 @@ op::util::ActivationFunction op::util::RNNCellBase::get_activation_function(size
|
||||
|
||||
shared_ptr<Node> op::util::RNNCellBase::add(const Output<Node>& lhs, const Output<Node>& rhs)
|
||||
{
|
||||
return {make_shared<op::Add>(lhs, rhs, op::AutoBroadcastSpec(op::AutoBroadcastType::NUMPY))};
|
||||
return {make_shared<op::v1::Add>(lhs, rhs)};
|
||||
}
|
||||
|
||||
shared_ptr<Node> op::util::RNNCellBase::sub(const Output<Node>& lhs, const Output<Node>& rhs)
|
||||
{
|
||||
return {
|
||||
make_shared<op::Subtract>(lhs, rhs, op::AutoBroadcastSpec(op::AutoBroadcastType::NUMPY))};
|
||||
return {make_shared<op::v1::Subtract>(lhs, rhs)};
|
||||
}
|
||||
|
||||
shared_ptr<Node> op::util::RNNCellBase::mul(const Output<Node>& lhs, const Output<Node>& rhs)
|
||||
{
|
||||
return {
|
||||
make_shared<op::Multiply>(lhs, rhs, op::AutoBroadcastSpec(op::AutoBroadcastType::NUMPY))};
|
||||
return {make_shared<op::v1::Multiply>(lhs, rhs)};
|
||||
}
|
||||
|
||||
shared_ptr<Node> op::util::RNNCellBase::clip(const Output<Node>& data) const
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user