Skip to content

[Relax][ONNX] Add ReverseSequence operator support - #20924

Open
Anirudh-65 wants to merge 1 commit into
apache:mainfrom
Anirudh-65:revseq-impl
Open

Anirudh-65 wants to merge 1 commit into
apache:mainfrom
Anirudh-65:revseq-impl

Conversation

@Anirudh-65

Copy link
Copy Markdown
Contributor

This commit adds support for the ONNX ReverseSequence operator in the Relax ONNX frontend.

Key changes:

  • In python/tvm/relax/frontend/onnx/onnx_frontend.py, added the ReverseSequence converter class (_impl_v10) mapping ONNX attributes time_axis (default 0) to Relax seq_axis and batch_axis (default 1) to Relax batch_axis.
  • Registered "ReverseSequence" in _get_convert_map().
  • In tests/python/relax/test_frontend_onnx.py, added structural IR equivalence tests (test_reverse_sequence_ir) and numerical correctness tests against ONNX Runtime (test_reverse_sequence).
  • In tests/python/relax/test_frontend_onnx_backend.py, added "reversesequence" to _INCLUDE_OPS to enable official ONNX node tests.

This commit adds support for the ONNX ReverseSequence operator in the
Relax ONNX frontend.

Key changes:
- In `python/tvm/relax/frontend/onnx/onnx_frontend.py`, added the
  `ReverseSequence` converter class (`_impl_v10`) mapping ONNX attributes
  `time_axis` (default 0) to Relax `seq_axis` and `batch_axis` (default 1)
  to Relax `batch_axis`.
- Registered "ReverseSequence" in `_get_convert_map()`.
- In `tests/python/relax/test_frontend_onnx.py`, added structural IR
  equivalence tests (`test_reverse_sequence_ir`) and numerical
  correctness tests against ONNX Runtime (`test_reverse_sequence`).
- In `tests/python/relax/test_frontend_onnx_backend.py`, added
  "reversesequence" to `_INCLUDE_OPS` to enable official ONNX node tests.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant