Revert batched pdist, improve existing kernel, add test (#15901)
authorGregory Chanan <gchanan@fb.com>
Thu, 17 Jan 2019 18:12:47 +0000 (10:12 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 17 Jan 2019 18:44:43 +0000 (10:44 -0800)
commit595f767880244979da6dcf22f6f032865ecb1718
tree252a7211a58242eb0833daccdbfe416ac43107e1
parentfbdafb006e144c313d824688581cbdfc2812e61e
Revert batched pdist, improve existing kernel, add test (#15901)

Summary:
1) Reverts https://github.com/pytorch/pytorch/pull/12302 which added support for batched pdist. Except I kept the (non-batched) test improvements that came with that PR, because they are nice to have.  Motivation: https://github.com/pytorch/pytorch/issues/15511
2) For the non-batched pdist, improved the existing kernel by forcing fp64 math and properly checking cuda launch errors
3) Added a 'large tensor' test that at least on my machine, fails on the batch pdist implementation.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15901

Reviewed By: ezyang

Differential Revision: D13616730

Pulled By: gchanan

fbshipit-source-id: 620d3f9b9acd492dc131bad9d2ff618d69fc2954
aten/src/ATen/native/Distance.cpp
aten/src/ATen/native/cpu/DistanceOpsKernel.cpp
aten/src/ATen/native/cuda/DistanceKernel.cu
test/common_utils.py
test/test_autograd.py
test/test_nn.py
test/test_torch.py
torch/nn/functional.py