OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
[FE] Add Sequence{At,Erase,Length} framework helpers (#36228)
Maxim Vafineed90e72c838
diff --git a/src/frontends/common/include/openvino/frontend/sequence_at.hpp b/src/frontends/common/include/openvino/frontend/sequence_at.hppnew file mode 100644index 00000000000..9a20d4f4e37--- /dev/null+++ b/src/frontends/common/include/openvino/frontend/sequence_at.hpp@@ -0,0 +1,43 @@+// Copyright (C) 2018-2026 Intel Corporation+// SPDX-License-Identifier: Apache-2.0+//++#pragma once++#include "openvino/frontend/visibility.hpp"+#include "openvino/op/util/framework_node.hpp"++namespace ov {+namespace frontend {++/// \brief SequenceAt is a helper operation that represents extracting a single element+/// from a sequence at a given position. It is emitted by frontends when the sequence+/// input is not yet resolvable to a SequenceMark (e.g., comes from an If/Loop output)+/// and is later resolved by SequenceIfReplacer or similar passes.+///+/// Inputs:+/// - input_sequence: The input sequence (typically the output of an If/Loop whose+/// body produces a SequenceMark/SequenceInsert chain).+/// - position: The position (scalar tensor) of the element to extract.+///+/// Output:+/// - The tensor at the requested position.+class FRONTEND_API SequenceAt : public ov::op::util::FrameworkNode {+public:+ OPENVINO_OP("SequenceAt", "util", ov::op::util::FrameworkNode);++ SequenceAt(const Output<Node>& input_sequence, const Output<Node>& position);++ std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& inputs) const override;++ Output<Node> get_input_sequence() const {+ return input_value(0);+ }++ Output<Node> get_position() const {+ return input_value(1);+ }+};++} // namespace frontend+} // namespace ovdiff --git a/src/frontends/common/include/openvino/frontend/sequence_erase.hpp b/src/frontends/common/include/openvino/frontend/sequence_erase.hppnew file mode 100644index 00000000000..d0e5e244d2f--- /dev/null+++ b/src/frontends/common/include/openvino/frontend/sequence_erase.hpp@@ -0,0 +1,48 @@+// Copyright (C) 2018-2026 Intel Corporation+// SPDX-License-Identifier: Apache-2.0+//++#pragma once++#include "openvino/frontend/visibility.hpp"+#include "openvino/op/util/framework_node.hpp"++namespace ov {+namespace frontend {++/// \brief SequenceErase is a helper operation that represents removing one element+/// from a sequence. Emitted by frontends when the sequence input is not yet+/// resolvable to a SequenceMark.+///+/// Inputs:+/// - input_sequence: The input sequence.+/// - position (optional): The position of the element to remove. When omitted,+/// the last element is removed (per the ONNX SequenceErase spec).+///+/// Output:+/// - The sequence with the element removed.+class FRONTEND_API SequenceErase : public ov::op::util::FrameworkNode {+public:+ OPENVINO_OP("SequenceErase", "util", ov::op::util::FrameworkNode);++ explicit SequenceErase(const Output<Node>& input_sequence);+ SequenceErase(const Output<Node>& input_sequence, const Output<Node>& position);++ std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& inputs) const override;++ Output<Node> get_input_sequence() const {+ return input_value(0);+ }++ bool has_position() const {+ return get_input_size() > 1;+ }++ Output<Node> get_position() const {+ OPENVINO_ASSERT(has_position(), "SequenceErase: no position input; check has_position() first");+ return input_value(1);+ }+};++} // namespace frontend+} // namespace ovdiff --git a/src/frontends/common/include/openvino/frontend/sequence_length.hpp b/src/frontends/common/include/openvino/frontend/sequence_length.hppnew file mode 100644index 00000000000..beb50f53b77--- /dev/null+++ b/src/frontends/common/include/openvino/frontend/sequence_length.hpp@@ -0,0 +1,37 @@+// Copyright (C) 2018-2026 Intel Corporation+// SPDX-License-Identifier: Apache-2.0+//++#pragma once++#include "openvino/frontend/visibility.hpp"+#include "openvino/op/util/framework_node.hpp"++namespace ov {+namespace frontend {++/// \brief SequenceLength is a helper operation that represents the length of a sequence.+/// Emitted by frontends when the sequence input is not yet resolvable to a SequenceMark.+///+/// Inputs:+/// - input_sequence: The input sequence.+///+/// Output:+/// - Scalar int64 tensor with the number of elements in the sequence.+class FRONTEND_API SequenceLength : public ov::op::util::FrameworkNode {+public:+ OPENVINO_OP("SequenceLength", "util", ov::op::util::FrameworkNode);++ explicit SequenceLength(const Output<Node>& input_sequence);++ void validate_and_infer_types() override;++ std::shared_ptr<Node> clone_with_new_inputs(const OutputVector& inputs) const override;++ Output<Node> get_input_sequence() const {+ return input_value(0);+ }+};++} // namespace frontend+} // namespace ovdiff --git a/src/frontends/common/src/sequence_at.cpp b/src/frontends/common/src/sequence_at.cppnew file mode 100644index 00000000000..d98163adb34--- /dev/null+++ b/src/frontends/common/src/sequence_at.cpp@@ -0,0 +1,19 @@+// Copyright (C) 2018-2026 Intel Corporation+// SPDX-License-Identifier: Apache-2.0+//++#include "openvino/frontend/sequence_at.hpp"++namespace ov {+namespace frontend {++SequenceAt::SequenceAt(const Output<Node>& input_sequence, const Output<Node>& position)+ : FrameworkNode({input_sequence, position}, 1) {}++std::shared_ptr<Node> SequenceAt::clone_with_new_inputs(const OutputVector& inputs) const {+ OPENVINO_ASSERT(inputs.size() == 2, "SequenceAt requires 2 inputs");+ return std::make_shared<SequenceAt>(inputs[0], inputs[1]);+}++} // namespace frontend+} // namespace ovdiff --git a/src/frontends/common/src/sequence_erase.cpp b/src/frontends/common/src/sequence_erase.cppnew file mode 100644index 00000000000..962b1b32902--- /dev/null+++ b/src/frontends/common/src/sequence_erase.cpp@@ -0,0 +1,25 @@+// Copyright (C) 2018-2026 Intel Corporation+// SPDX-License-Identifier: Apache-2.0+//++#include "openvino/frontend/sequence_erase.hpp"++namespace ov {+namespace frontend {++SequenceErase::SequenceErase(const Output<Node>& input_sequence) : FrameworkNode({input_sequence}, 1) {}++SequenceErase::SequenceErase(const Output<Node>& input_sequence, const Output<Node>& position)+ : FrameworkNode({input_sequence, position}, 1) {}++std::shared_ptr<Node> SequenceErase::clone_with_new_inputs(const OutputVector& inputs) const {+ if (inputs.size() == 1) {+ return std::make_shared<SequenceErase>(inputs[0]);+ } else if (inputs.size() == 2) {+ return std::make_shared<SequenceErase>(inputs[0], inputs[1]);+ }+ OPENVINO_THROW("SequenceErase requires 1 or 2 inputs");+}++} // namespace frontend+} // namespace ovdiff --git a/src/frontends/common/src/sequence_length.cpp b/src/frontends/common/src/sequence_length.cppnew file mode 100644index 00000000000..014999ee718--- /dev/null+++ b/src/frontends/common/src/sequence_length.cpp@@ -0,0 +1,26 @@+// Copyright (C) 2018-2026 Intel Corporation+// SPDX-License-Identifier: Apache-2.0+//++#include "openvino/frontend/sequence_length.hpp"++#include "openvino/core/type/element_type.hpp"++namespace ov {+namespace frontend {++SequenceLength::SequenceLength(const Output<Node>& input_sequence) : FrameworkNode({input_sequence}, 1) {+ validate_and_infer_types();+}++void SequenceLength::validate_and_infer_types() {+ set_output_type(0, ov::element::i64, ov::Shape{});+}++std::shared_ptr<Node> SequenceLength::clone_with_new_inputs(const OutputVector& inputs) const {+ OPENVINO_ASSERT(inputs.size() == 1, "SequenceLength requires 1 input");+ return std::make_shared<SequenceLength>(inputs[0]);+}++} // namespace frontend+} // namespace ovdiff --git a/src/frontends/common_translators/src/unconverted_ops_report.cpp b/src/frontends/common_translators/src/unconverted_ops_report.cppindex 821dcb95c83..64b99857359 100644--- a/src/frontends/common_translators/src/unconverted_ops_report.cpp+++ b/src/frontends/common_translators/src/unconverted_ops_report.cpp@@ -34,14 +34,24 @@ UnconvertedOpsReport collect_unconverted_ops(const std::shared_ptr<ov::Model>& mif (!model) {return report;}-for (const auto& node : model->get_ordered_ops()) {- // Try framework-specific extractor first+ // Try framework-specific extractor first; fall back to the universal+ // FrameworkNode handler for any node the extractor did not claim.if (auto result = extractor(node)) {report.add(result->first, result->second);+ } else if (ov::is_type<ov::op::util::FrameworkNode>(node)) {+ // Any unclaimed FrameworkNode left at the end of conversion —+ // typically a frontend helper like SequenceMark / SequenceAt that+ // no transformation managed to lower — is an unconverted op too.+ const auto& ti = node->get_type_info();+ std::string op_name = ti.version_id ? std::string(ti.version_id) + "::" + ti.name : std::string(ti.name);+ report.add(op_name, std::string{});}- // Handle MultiSubGraphOp (parent of Loop, If, etc.) - common for all frontends+ // Handle MultiSubGraphOp instances (Loop / If / TensorIterator, and FrameworkNode+ // subclasses such as PtFrameworkNode that hold real body subgraphs) — recurse into+ // their body subgraphs. Helper FrameworkNodes without bodies (SequenceAt, SequenceErase,+ // etc.) have get_internal_subgraphs_size() == 0 and the loop simply does not execute.if (const auto& subgraph_op = ov::as_type_ptr<ov::op::util::MultiSubGraphOp>(node)) {for (size_t i = 0; i < subgraph_op->get_internal_subgraphs_size(); ++i) {report.merge(collect_unconverted_ops(subgraph_op->get_function(i), extractor));diff --git a/src/frontends/onnx/docs/supported_ops.md b/src/frontends/onnx/docs/supported_ops.mdindex dcfaa4841a0..8d61ae6cc1e 100644--- a/src/frontends/onnx/docs/supported_ops.md+++ b/src/frontends/onnx/docs/supported_ops.md@@ -169,9 +169,9 @@ OpenVINO provides support for operations of Default Opset (empty in table below)| |SequenceAt |11 |11 |Supported only in certain patterns|| |SequenceConstruct |11 |11 |Supported only in certain patterns|| |SequenceEmpty |11 |11 |Supported only in certain patterns|-| |SequenceErase | |11 | |+| |SequenceErase |11 |11 |Supported only in certain patterns|| |SequenceInsert |11 |11 |Supported only in certain patterns|-| |SequenceLength | |11 | |+| |SequenceLength |11 |11 |Supported only in certain patterns|| |SequenceMap | |17 | || |Shape |15, 1 |21, 19, 15, 13, 1 | || |Shrink |9 |9 | |diff --git a/src/frontends/onnx/frontend/src/op/sequence_at.cpp b/src/frontends/onnx/frontend/src/op/sequence_at.cppindex 5fc7af3117d..ba7cbd00824 100644--- a/src/frontends/onnx/frontend/src/op/sequence_at.cpp+++ b/src/frontends/onnx/frontend/src/op/sequence_at.cpp@@ -2,6 +2,8 @@// SPDX-License-Identifier: Apache-2.0//+#include "openvino/frontend/sequence_at.hpp"+#include <memory>#include "core/operator_set.hpp"@@ -31,24 +33,27 @@ ov::OutputVector sequence_at(const ov::frontend::onnx::Node& node) {const auto& inputs = node.get_ov_inputs();- const auto& input_sequence = as_type_ptr<SequenceMark>(inputs[0].get_node_shared_ptr());- OPENVINO_ASSERT(input_sequence, "SequenceAt: 'input' must be a sequence");-auto position = inputs[1];OPENVINO_ASSERT(position.get_partial_shape().rank().compatible(0), "SequenceAt: 'position' input must be a scalar");- const auto position_const = ov::util::get_constant_from_source(position);- OPENVINO_ASSERT(position_const, "SequenceAt: 'position' input must be constant");-- const auto position_value = position_const->cast_vector<std::int64_t>()[0];-- const auto input_sequence_length = static_cast<std::int64_t>(input_sequence->get_sequence().size());-- const auto position_value_normalized = position_value < 0 ? position_value + input_sequence_length : position_value;- OPENVINO_ASSERT(position_value_normalized >= 0 && position_value_normalized < input_sequence_length,- "SequenceAt: 'position' is out of bounds");-- return {input_sequence->get_sequence().at(position_value_normalized)};+ // Fast path: input is a SequenceMark chain - resolve directly.+ if (const auto input_sequence = as_type_ptr<SequenceMark>(inputs[0].get_node_shared_ptr())) {+ const auto position_const = ov::util::get_constant_from_source(position);+ if (position_const) {+ const auto position_value = position_const->cast_vector<std::int64_t>()[0];+ const auto seq = input_sequence->get_sequence();+ const auto input_sequence_length = static_cast<std::int64_t>(seq.size());+ const auto position_value_normalized =+ position_value < 0 ? position_value + input_sequence_length : position_value;+ OPENVINO_ASSERT(position_value_normalized >= 0 && position_value_normalized < input_sequence_length,+ "SequenceAt: 'position' is out of bounds");+ return {seq.at(position_value_normalized)};+ }+ }++ // Deferred path: the sequence is not directly accessible (e.g., it comes from an+ // If/Loop output). Emit a helper op that will be resolved by a later transformation.+ return {std::make_shared<ov::frontend::SequenceAt>(inputs[0], inputs[1])};}/// @brief Registers the SequenceAt operator implementation in the ONNX frontenddiff --git a/src/frontends/onnx/frontend/src/op/sequence_erase.cpp b/src/frontends/onnx/frontend/src/op/sequence_erase.cppnew file mode 100644index 00000000000..9480177beb1--- /dev/null+++ b/src/frontends/onnx/frontend/src/op/sequence_erase.cpp@@ -0,0 +1,71 @@+// Copyright (C) 2018-2026 Intel Corporation+// SPDX-License-Identifier: Apache-2.0+//++#include "openvino/frontend/sequence_erase.hpp"++#include <memory>++#include "core/operator_set.hpp"+#include "exceptions.hpp"+#include "openvino/core/validation_util.hpp"+#include "openvino/frontend/sequence_mark.hpp"+#include "openvino/op/constant.hpp"+#include "utils/common.hpp"++namespace ov {+namespace frontend {+namespace onnx {+namespace ai_onnx {+namespace opset_11 {++/// @brief Implements the SequenceErase operator.+/// @param node Input ONNX node. Inputs: sequence and optional position.+/// When position is omitted, the last element is removed.+/// @return A new sequence with the requested element removed.+ov::OutputVector sequence_erase(const ov::frontend::onnx::Node& node) {+ constexpr auto min_inputs = 1;+ constexpr auto max_inputs = 2;+ common::default_op_checks(node, min_inputs, max_inputs);++ const auto& inputs = node.get_ov_inputs();++ if (inputs.size() == 2) {+ OPENVINO_ASSERT(inputs[1].get_partial_shape().rank().compatible(0),+ "SequenceErase: 'position' input must be a scalar");+ }++ // Fast path: input is a SequenceMark with a constant (or omitted) position.+ if (const auto input_sequence = as_type_ptr<SequenceMark>(inputs[0].get_node_shared_ptr())) {+ auto seq = input_sequence->get_sequence();+ const auto length = static_cast<std::int64_t>(seq.size());+ std::int64_t position = length - 1;+ if (inputs.size() == 2) {+ const auto position_const = ov::util::get_constant_from_source(inputs[1]);+ if (!position_const) {+ // Position is dynamic - defer.+ return {std::make_shared<ov::frontend::SequenceErase>(inputs[0], inputs[1])};+ }+ position = position_const->cast_vector<std::int64_t>()[0];+ }+ const auto position_normalized = position < 0 ? position + length : position;+ OPENVINO_ASSERT(position_normalized >= 0 && position_normalized < length,+ "SequenceErase: 'position' is out of bounds");+ seq.erase(seq.begin() + position_normalized);+ return {std::make_shared<ov::frontend::SequenceMark>(seq)};+ }++ // Deferred path: emit a helper op resolved by a later transformation.+ if (inputs.size() == 2) {+ return {std::make_shared<ov::frontend::SequenceErase>(inputs[0], inputs[1])};+ }+ return {std::make_shared<ov::frontend::SequenceErase>(inputs[0])};+}++ONNX_OP("SequenceErase", OPSET_SINCE(1), ai_onnx::opset_11::sequence_erase);++} // namespace opset_11+} // namespace ai_onnx+} // namespace onnx+} // namespace frontend+} // namespace ovdiff --git a/src/frontends/onnx/frontend/src/op/sequence_length.cpp b/src/frontends/onnx/frontend/src/op/sequence_length.cppnew file mode 100644index 00000000000..7215e8f958b--- /dev/null+++ b/src/frontends/onnx/frontend/src/op/sequence_length.cpp@@ -0,0 +1,45 @@+// Copyright (C) 2018-2026 Intel Corporation+// SPDX-License-Identifier: Apache-2.0+//++#include "openvino/frontend/sequence_length.hpp"++#include <memory>++#include "core/operator_set.hpp"+#include "exceptions.hpp"+#include "openvino/core/type.hpp"+#include "openvino/frontend/sequence_mark.hpp"+#include "openvino/op/constant.hpp"+#include "utils/common.hpp"++namespace ov {+namespace frontend {+namespace onnx {+namespace ai_onnx {+namespace opset_11 {++/// @brief Implements the SequenceLength operator+/// @param node Input ONNX node with a single sequence input.+/// @return A scalar int64 tensor with the number of elements in the sequence.+ov::OutputVector sequence_length(const ov::frontend::onnx::Node& node) {+ common::default_op_checks(node, 1, 1);+ const auto& inputs = node.get_ov_inputs();++ // Fast path: input is a SequenceMark chain - resolve directly to a constant.+ if (const auto input_sequence = as_type_ptr<SequenceMark>(inputs[0].get_node_shared_ptr())) {+ const auto length = static_cast<std::int64_t>(input_sequence->get_sequence().size());+ return {ov::op::v0::Constant::create(ov::element::i64, ov::Shape{}, {length})};+ }++ // Deferred path: emit a helper op that will be resolved by a later transformation.+ return {std::make_shared<ov::frontend::SequenceLength>(inputs[0])};+}++ONNX_OP("SequenceLength", OPSET_SINCE(1), ai_onnx::opset_11::sequence_length);++} // namespace opset_11+} // namespace ai_onnx+} // namespace onnx+} // namespace frontend+} // namespace ovdiff --git a/src/frontends/onnx/tests/models/sequence_erase_last.prototxt b/src/frontends/onnx/tests/models/sequence_erase_last.prototxtnew file mode 100644index 00000000000..4d419195cfa--- /dev/null+++ b/src/frontends/onnx/tests/models/sequence_erase_last.prototxt@@ -0,0 +1,82 @@+ir_version: 10+graph {+ node {+ input: "a"+ input: "b"+ input: "c"+ output: "seq"+ op_type: "SequenceConstruct"+ }+ node {+ input: "seq"+ output: "seq2"+ op_type: "SequenceErase"+ }+ node {+ input: "seq2"+ input: "pos_at"+ output: "output"+ op_type: "SequenceAt"+ }+ name: "sequence_erase_last"+ initializer {+ data_type: 7+ int64_data: 1+ name: "pos_at"+ }+ input {+ name: "a"+ type {+ tensor_type {+ elem_type: 1+ shape {+ dim {+ dim_value: 2+ }+ }+ }+ }+ }+ input {+ name: "b"+ type {+ tensor_type {+ elem_type: 1+ shape {+ dim {+ dim_value: 2+ }+ }+ }+ }+ }+ input {+ name: "c"+ type {+ tensor_type {+ elem_type: 1+ shape {+ dim {+ dim_value: 2+ }+ }+ }+ }+ }+ output {+ name: "output"+ type {+ tensor_type {+ elem_type: 1+ shape {+ dim {+ dim_value: 2+ }+ }+ }+ }+ }+}+opset_import {+ version: 11+}diff --git a/src/frontends/onnx/tests/models/sequence_erase_middle.prototxt b/src/frontends/onnx/tests/models/sequence_erase_middle.prototxtnew file mode 100644index 00000000000..21838c8d2ec--- /dev/null+++ b/src/frontends/onnx/tests/models/sequence_erase_middle.prototxt@@ -0,0 +1,88 @@+ir_version: 10+graph {+ node {+ input: "a"+ input: "b"+ input: "c"+ output: "seq"+ op_type: "SequenceConstruct"+ }+ node {+ input: "seq"+ input: "pos_erase"+ output: "seq2"+ op_type: "SequenceErase"+ }+ node {+ input: "seq2"+ input: "pos_at"+ output: "output"+ op_type: "SequenceAt"+ }+ name: "sequence_erase_middle"+ initializer {+ data_type: 7+ int64_data: 1+ name: "pos_erase"+ }+ initializer {+ data_type: 7+ int64_data: 0+ name: "pos_at"+ }+ input {+ name: "a"+ type {+ tensor_type {+ elem_type: 1+ shape {+ dim {+ dim_value: 2+ }+ }+ }+ }+ }+ input {+ name: "b"+ type {+ tensor_type {+ elem_type: 1+ shape {+ dim {+ dim_value: 2+ }+ }+ }+ }+ }+ input {+ name: "c"+ type {+ tensor_type {+ elem_type: 1+ shape {+ dim {+ dim_value: 2+ }+ }+ }+ }+ }+ output {+ name: "output"+ type {+ tensor_type {+ elem_type: 1+ shape {+ dim {+ dim_value: 2+ }+ }+ }+ }+ }+}+opset_import {+ version: 11+}diff --git a/src/frontends/onnx/tests/models/sequence_length_3_elements.prototxt b/src/frontends/onnx/tests/models/sequence_length_3_elements.prototxtnew file mode 100644index 00000000000..ce5b8f89d66--- /dev/null+++ b/src/frontends/onnx/tests/models/sequence_length_3_elements.prototxt@@ -0,0 +1,50 @@+ir_version: 10+graph {+ node {+ input: "a"+ input: "b"+ input: "c"+ output: "seq"+ op_type: "SequenceConstruct"+ }+ node {+ input: "seq"+ output: "length"+ op_type: "SequenceLength"+ }+ name: "sequence_length_3_elements"+ initializer {+ dims: 2+ data_type: 1+ float_data: 1.0+ float_data: 2.0+ name: "a"+ }+ initializer {+ dims: 2+ data_type: 1+ float_data: 3.0+ float_data: 4.0+ name: "b"+ }+ initializer {+ dims: 2+ data_type: 1+ float_data: 5.0+ float_data: 6.0+ name: "c"+ }+ output {+ name: "length"+ type {+ tensor_type {+ elem_type: 7+ shape {+ }+ }+ }+ }+}+opset_import {+ version: 11+}diff --git a/src/frontends/onnx/tests/onnx_import.in.cpp b/src/frontends/onnx/tests/onnx_import.in.cppindex f199de6169e..6566b24ac3d 100644--- a/src/frontends/onnx/tests/onnx_import.in.cpp+++ b/src/frontends/onnx/tests/onnx_import.in.cpp@@ -7619,6 +7619,48 @@ OPENVINO_TEST(${BACKEND_NAME}, onnx_split_to_sequence_explicit_split_1d) {test_case.run();}+/// @brief Testing ONNX SequenceLength operator via SequenceConstruct fast path.+/// All inputs are graph initializers (constants), so SequenceLength is constant-folded+/// at conversion time to the scalar value 3.+OPENVINO_TEST(${BACKEND_NAME}, onnx_sequence_length_constant_sequence) {+ const auto model = convert_model("sequence_length_3_elements.onnx");+ auto test_case = test::TestCase(model, s_device);++ test_case.add_expected_output<int64_t>(Shape{}, {3});++ test_case.run();+}++/// @brief Testing ONNX SequenceErase operator: fast path, erase middle element.+/// Graph: SequenceConstruct(a, b, c) -> SequenceErase(pos=1) -> SequenceAt(pos=0) -> a.+/// After erasing element at index 1 (b), the sequence is [a, c]; SequenceAt(0) returns a.+OPENVINO_TEST(${BACKEND_NAME}, onnx_sequence_erase_middle_element) {+ const auto model = convert_model("sequence_erase_middle.onnx");+ auto test_case = test::TestCase(model, s_device);++ test_case.add_input<float>(Shape{2}, {10., 20.}); // a+ test_case.add_input<float>(Shape{2}, {30., 40.}); // b (erased)+ test_case.add_input<float>(Shape{2}, {50., 60.}); // c+ test_case.add_expected_output<float>(Shape{2}, {10., 20.});++ test_case.run();+}++/// @brief Testing ONNX SequenceErase operator: fast path, erase last element (no position input).+/// Graph: SequenceConstruct(a, b, c) -> SequenceErase() -> SequenceAt(pos=1) -> b.+/// After erasing the last element (c), the sequence is [a, b]; SequenceAt(1) returns b.+OPENVINO_TEST(${BACKEND_NAME}, onnx_sequence_erase_last_element) {+ const auto model = convert_model("sequence_erase_last.onnx");+ auto test_case = test::TestCase(model, s_device);++ test_case.add_input<float>(Shape{2}, {10., 20.}); // a+ test_case.add_input<float>(Shape{2}, {30., 40.}); // b+ test_case.add_input<float>(Shape{2}, {50., 60.}); // c (erased)+ test_case.add_expected_output<float>(Shape{2}, {30., 40.});++ test_case.run();+}+/// @brief Testing ONNX BitShift with an Y output of uint32 type/// The input model was taken from a bug report, where parsing the type of the Y input/// failed.diff --git a/src/frontends/onnx/tests/tests_python/test_backend.py b/src/frontends/onnx/tests/tests_python/test_backend.pyindex c63e917eae2..b7aec9a6f9a 100644--- a/src/frontends/onnx/tests/tests_python/test_backend.py+++ b/src/frontends/onnx/tests/tests_python/test_backend.py@@ -152,9 +152,6 @@ tests_expected_to_fail = [xfail_issue_33596,"OnnxBackendSimpleModelTest.test_sequence_model1_cpu","OnnxBackendSimpleModelTest.test_sequence_model3_cpu",- "OnnxBackendSimpleModelTest.test_sequence_model6_cpu",- "OnnxBackendSimpleModelTest.test_sequence_model8_cpu",- "OnnxBackendSimpleModelTest.test_sequence_model2_cpu","OnnxBackendNodeModelTest.test_identity_sequence_cpu","OnnxBackendNodeModelTest.test_if_seq_cpu","OnnxBackendNodeModelTest.test_if_opt_cpu", # Optional, SequenceConstruct