Avoid NaN values in torch.cdist backward for p<1 (#45720)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/36493
Pull Request resolved: https://github.com/pytorch/pytorch/pull/45720
Reviewed By: VitalyFedyunin
Differential Revision: D24112541
Pulled By: albanD
fbshipit-source-id: 8598a9e7cc0f6f9ea46c007f2e3365970aea0116