pytorch
72cedba6 - Opinfo test for mvlgamma: add epsilon (#71794)

Commit
2 years ago
Opinfo test for mvlgamma: add epsilon (#71794) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/71794 mvlgamma(inp, p) requires that all the elements of inp are > (p-1)/2. The opinfo test was occasionally producing inputs with elements == (p-1/2), which would generate errors like: ``` ERROR: test_nnc_correctness_mvlgamma_mvlgamma_p_5_cpu_bfloat16 (__main__.TestNNCOpInfoCPU) ---------------------------------------------------------------------- Traceback (most recent call last): File "/path/pytorch/torch/testing/_internal/common_device_type.py", line 381, in instantiated_test raise rte File "/path/pytorch/torch/testing/_internal/common_device_type.py", line 376, in instantiated_test result = test(self, **param_kwargs) File "/path/pytorch/torch/testing/_internal/common_device_type.py", line 753, in test_wrapper return test(*args, **kwargs) File "/path/pytorch/torch/testing/_internal/common_device_type.py", line 907, in only_fn return fn(slf, *args, **kwargs) File "/path/pytorch/test/test_jit_fuser_te.py", line 2293, in test_nnc_correctness ref = variant(*clone_inputs((sample.input, *sample.args)), **sample.kwargs) RuntimeError: All elements must be greater than (p-1)/2 ``` repro example: https://gist.github.com/davidberard98/9da688e31cdfbaed7e990746b28a4ba2 Test Plan: Imported from OSS Reviewed By: qihqi Differential Revision: D33780905 Pulled By: davidberard98 fbshipit-source-id: c9afd443bc90ce68f33b97498921b447e4f7d1d8 (cherry picked from commit a974b03f071d1bebf90a33edf801a5d6365b91b2)
Author
Committer
Parents
Loading