Fixed median nan propagation and implemented nanmedian (#45847)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/45847

Original PR here https://github.com/pytorch/pytorch/pull/45084. Created this one because I was having problems with ghstack.

Test Plan: Imported from OSS

Reviewed By: mruberry

Differential Revision: D24136629

Pulled By: heitorschueroff

fbshipit-source-id: dd7c7540a33f6a19e1ad70ba2479d5de44abbdf9
This commit is contained in:
Heitor Schueroff de Souza
2020-10-08 11:18:42 -07:00
committed by Facebook GitHub Bot
parent 298e0e0d57
commit 636eb18029
20 changed files with 904 additions and 375 deletions

View File

@ -1220,6 +1220,7 @@ class TestNamedTensor(TestCase):
Case(torch.mode, False, False, True, True, values_and_indices),
Case(kthvalue_wrapper, False, False, True, True, values_and_indices),
Case(torch.median, True, False, True, True, values_and_indices),
Case(torch.nanmedian, True, False, True, True, values_and_indices),
]
for testcase, device in itertools.product(tests, torch.testing.get_all_device_types()):