Skip to content

[PT FE] Support aten::ravel operator - #38097

Open
Anurag-M1 wants to merge 1 commit into
openvinotoolkit:masterfrom
Anurag-M1:feat/pytorch-fe-ravel
Open

[PT FE] Support aten::ravel operator#38097
Anurag-M1 wants to merge 1 commit into
openvinotoolkit:masterfrom
Anurag-M1:feat/pytorch-fe-ravel

Conversation

@Anurag-M1

Copy link
Copy Markdown

Details:

  • Implemented translate_ravel in src/frontends/pytorch/src/op/ravel.cpp converting aten::ravel to OpenVINO v1::Reshape targeting [-1], including support for complex tensors via ComplexTypeMark.
  • Registered aten::ravel in TorchScript operations (get_supported_ops_ts()) and aten.ravel.default in FX operations (get_supported_ops_fx()) in src/frontends/pytorch/src/op_table.cpp.
  • Added layer tests in tests/layer_tests/pytorch_tests/test_ravel.py covering various ranks (1D, 2D, 3D, 4D), scalar shapes, and multiple data types (float32, float64, int32, int64, int8).

Tickets:

AI Assistance:

  • AI assistance used: yes
  • If yes, summarize how AI was used and what human validation was performed (build/tests/manual checks):
    AI was used to draft the operator translation following existing PyTorch frontend patterns (op/reshape.cpp) and generate test cases. Python syntax checks and local failure reproduction tests were performed.

- Add translate_ravel in src/frontends/pytorch/src/op/ravel.cpp with support for complex tensors
- Register aten::ravel in get_supported_ops_ts() and aten.ravel.default in get_supported_ops_fx() in op_table.cpp
- Add comprehensive layer tests covering multiple shapes and dtypes in tests/layer_tests/pytorch_tests/test_ravel.py

Relates to openvinotoolkit#28584, openvinotoolkit#28902
@Anurag-M1
Anurag-M1 requested a review from a team as a code owner September 12, 2026 08:38
@github-actions github-actions Bot added the category: PyTorch FE OpenVINO PyTorch Frontend label Sep 12, 2026
@sys-openvino-ci sys-openvino-ci added the ExternalPR External contributor label Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: PyTorch FE OpenVINO PyTorch Frontend ExternalPR External contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants