Skip to content

Conversation

@Raakshass
Copy link

Summary

Adds support for PyTorch operations aten::logit and aten::special_logit to the OpenVINO PyTorch Frontend.

Changes

  • Implemented translate_logit() function in src/frontends/pytorch/src/op/logit.cpp.
  • Registered both aten::logit and aten::special_logit operations in op_table.cpp.
  • Added comprehensive layer tests covering FP32, FP16, and various eps parameter values.

Implementation Details

The logit function is decomposed using the formula:
result = log(x / (1 - x))

  • When eps is provided, the input is clamped to [eps, 1-eps] before calculation to ensure numerical stability.
  • Uses OpenVINO operations: Clamp, Subtract, Divide, Log.

Testing

  • Tests created in tests/layer_tests/pytorch_tests/test_logit.py.
  • Covers eps values: None, 1e-6, 0.01.
  • Tests both operation aliases (aten::logit and aten::special_logit).

Related Issue

Closes #28744

- Implement translate_logit with clamp-based decomposition
- Register aten::special_logit as operation alias
- Add comprehensive layer tests for different eps and precisions

Closes openvinotoolkit#28744
@Raakshass Raakshass requested a review from a team as a code owner January 1, 2026 13:10
@github-actions github-actions bot added the category: PyTorch FE OpenVINO PyTorch Frontend label Jan 1, 2026
@sys-openvino-ci sys-openvino-ci added the ExternalPR External contributor label Jan 1, 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.

[Good First Issue]: Support aten::logit, aten::special_logit

2 participants