Skip to content

Conversation

@saquibjawedbit
Copy link

Details:

  • Implemented full support for aten::_standard_gamma(Tensor self, Generator? generator=None)
    • Rejects non-None generator inputs
    • Promotes concentration to f32 internally and converts back to original dtype at the end
  • Added shape extraction and broadcasting logic to produce the expanded sampling shape used by the algorithm.
  • Implemented the Marsaglia–Tsang acceptance–rejection gamma sampling algorithm using OpenVINO ops:
    • RandomNormal
    • RandomUniform
    • Sqrt, Log, Power
    • Multiply, Add, Subtract, Maximum
    • CumSum, ReduceSum, ReduceLogicalOr
    • Gather, Select, Convert
  • Added constants for:
    • number of sampling trials
    • minimum uniform cutoff value
    • fallback path using gamma_candidates or last_candidate depending on acceptance mask
  • Final node output uses ConvertLike to match the original input dtype.

Added Tests

  • Created tests that wrap torch._standard_gamma in a minimal PyTorch module.
  • Converted this module with ov.convert_model using example inputs.
  • Compiled the resulting model using:
    ov.Core().compile_model(...)

Tickets:

@saquibjawedbit saquibjawedbit requested a review from a team as a code owner December 7, 2025 12:21
@github-actions github-actions bot added the category: PyTorch FE OpenVINO PyTorch Frontend label Dec 7, 2025
@sys-openvino-ci sys-openvino-ci added the ExternalPR External contributor label Dec 7, 2025
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::_standard_gamma

2 participants