openvino icon indicating copy to clipboard operation
openvino copied to clipboard

Implement aten::_standard_gamma frontend conversion, add statistical tests, and update op-table mappings

Open saquibjawedbit opened this issue 3 weeks ago • 1 comments

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:

  • Closes #29686

saquibjawedbit avatar Dec 07 '25 12:12 saquibjawedbit

Kindly requesting a review when convenient. Thank you!

saquibjawedbit avatar Dec 10 '25 07:12 saquibjawedbit