Skip to content

[PT FE] Add support for prim::unchecked_cast #29986

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

shaanCh
Copy link

@shaanCh shaanCh commented Apr 8, 2025

Details:

This PR adds support for the PyTorch prim::unchecked_cast operator in OpenVINO's PyTorch frontend

  • Implemented translate_unchecked_cast in src/frontends/pytorch/src/op/unchecked_cast.cpp using ov::op::v0::Convert to cast input tensors to the specified dtype.
  • Updated op_table.cpp to map prim::unchecked_cast to the new translator.
  • Verified locally with cmake --build . --config Release—compiled clean with no errors.

Tickets:

@shaanCh shaanCh requested a review from a team as a code owner April 8, 2025 03:58
@github-actions github-actions bot added the category: PyTorch FE OpenVINO PyTorch Frontend label Apr 8, 2025
@sys-openvino-ci sys-openvino-ci added the ExternalPR External contributor label Apr 8, 2025
Copy link
Contributor

@p-wysocki p-wysocki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR! Please add tests.

@shaanCh
Copy link
Author

shaanCh commented Apr 13, 2025

Test file has been added

@mlukasze mlukasze linked an issue Apr 15, 2025 that may be closed by this pull request
@mlukasze
Copy link
Contributor

build_jenkins

@p-wysocki p-wysocki self-requested a review April 24, 2025 13:29
@p-wysocki
Copy link
Contributor

bump @mvafin

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.

[Good First Issue]: Support prim::unchecked_cast
4 participants