Linter, deprecated type()

Summary: Run linter after recent changes. Fix long comment in knn.h which clang-format has reflowed badly. Add crude test that code doesn't call deprecated `.type()` or `.data()`.

Reviewed By: nikhilaravi

Differential Revision: D20692935

fbshipit-source-id: 28ce0308adae79a870cb41a810b7cf8744f41ab8
This commit is contained in:
Jeremy Reizenstein
2020-03-29 14:01:15 -07:00
committed by Facebook GitHub Bot
parent 3061c5b663
commit 37c5c8e0b6
10 changed files with 430 additions and 259 deletions

View File

@@ -28,7 +28,7 @@ class TestKNN(unittest.TestCase):
def test_knn_vs_python_cpu(self):
""" Test CPU output vs PyTorch implementation """
device = torch.device('cpu')
device = torch.device("cpu")
Ns = [1, 4]
Ds = [2, 3]
P1s = [1, 10, 101]
@@ -45,7 +45,7 @@ class TestKNN(unittest.TestCase):
def test_knn_vs_python_cuda(self):
""" Test CUDA output vs PyTorch implementation """
device = torch.device('cuda')
device = torch.device("cuda")
Ns = [1, 4]
Ds = [2, 3, 8]
P1s = [1, 8, 64, 128, 1001]