openvino
openvino copied to clipboard
Implement aten::_standard_gamma frontend conversion, add statistical tests, and update op-table mappings
Details:
- Implemented full support for
aten::_standard_gamma(Tensor self, Generator? generator=None)- Rejects non-None
generatorinputs - Promotes
concentrationtof32internally and converts back to original dtype at the end
- Rejects non-None
- 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:
RandomNormalRandomUniformSqrt,Log,PowerMultiply,Add,Subtract,MaximumCumSum,ReduceSum,ReduceLogicalOrGather,Select,Convert
- Added constants for:
- number of sampling trials
- minimum uniform cutoff value
- fallback path using
gamma_candidatesorlast_candidatedepending on acceptance mask
- Final node output uses
ConvertLiketo match the original input dtype.
Added Tests
- Created tests that wrap
torch._standard_gammain a minimal PyTorch module. - Converted this module with
ov.convert_modelusing example inputs. - Compiled the resulting model using:
ov.Core().compile_model(...)
Tickets:
- Closes #29686
Kindly requesting a review when convenient. Thank you!