Fix for cdist backward for non-batch tensors (#22915)
Summary:
Fix for: https://github.com/pytorch/pytorch/issues/22353
Pull Request resolved: https://github.com/pytorch/pytorch/pull/22915
Differential Revision: D16291406
Pulled By: ifedan
fbshipit-source-id: 2decbe94c95165f7ddb2c8e2f4c4747c19069a4c