Class ov::op::util::SubGraphOp#

class SubGraphOp : public ov::op::util::MultiSubGraphOp#

Abstract base class for sub-graph based ops, i.e ops that have only one sub-graph.

Subclassed by ov::op::v0::TensorIterator, ov::op::v5::Loop

Public Functions

inline const std::vector<std::shared_ptr<InputDescription>> &get_input_descriptions() const#
Returns:

a reference to the input descriptions.

inline std::vector<std::shared_ptr<InputDescription>> &get_input_descriptions()#
Returns:

a reference to the input descriptions. Can add input descriptions before validation.

inline const std::vector<std::shared_ptr<OutputDescription>> &get_output_descriptions() const#
Returns:

a reference to the output descriptions.

inline std::vector<std::shared_ptr<OutputDescription>> &get_output_descriptions()#
Returns:

a reference to the output descriptions. Can add output descriptions before validation.

virtual void set_sliced_input(const std::shared_ptr<ov::op::v0::Parameter> &parameter, const Output<Node> &value, int64_t start, int64_t stride, int64_t part_size, int64_t end, int64_t axis)#

Indicate that a body parameter comes from slices of a value.

Parameters:
  • parameter – The parameter to receive the slices

  • value – The value to be sliced. This will be added as an input to SubGraphOp.

  • start – First index on axis of the slicing

  • stride – Stepping of the slice

  • part_size – Size of the slice on axis

  • end – The last index on axis of the slicing

  • axis – The axis to slice along

virtual void set_merged_input(const std::shared_ptr<ov::op::v0::Parameter> &body_parameter, const Output<Node> &initial_value, const Output<Node> &successive_value)#

Indicates that a body parameter has an initial value in the first iteration and computed value thereafter.

Parameters:
  • body_parameter[in] The body parameter

  • initial_value – Value for the parameter in first iteration. This will be added as an input to Loop.

  • successive_value – Value for the parameter in successive iterations. The value is what is active in the most recent completed iteration.

virtual void set_invariant_input(const std::shared_ptr<ov::op::v0::Parameter> &body_parameter, const Output<Node> &value)#

Indicates that a body parameter has an invariant value during iteration that may depend on values computed outside of the iteration.

Parameters:
  • body_parameter – The body parameter

  • value – The value supplied as an input to the block

virtual Output<Node> get_iter_value(const Output<Node> &body_value, int64_t iteration = -1)#

Gets a value for a particular iteration point.

Parameters:
  • body_value – The value

  • iteration – The iteration that supplies the value. Negative values are from the last iteration. Default value -1 (the last iteration).

Returns:

The iterator value.

virtual Output<Node> get_concatenated_slices(const Output<Node> &value, int64_t start, int64_t stride, int64_t part_size, int64_t end, int64_t axis)#

Concatenates slices from all iterations.

Parameters:
  • value – The value supplying slice values from each iteration.

  • start – First index on axis of the slicing

  • stride – Stepping of the slice

  • part_size – Size of the slice on axis

  • end – The last index on axis of the slicing

  • axis – The axis to slice along

Returns:

The concatenated slices.