Skip to content

Commit a3fe182

Browse files
cyyeverpytorchmergebot
authored andcommitted
 Fix incomplete torch.cdist tests (pytorch#166507)
Because the `p` value is not used. Pull Request resolved: pytorch#166507 Approved by: https://github.com/Skylion007
1 parent deb7763 commit a3fe182

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/test_torch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2598,7 +2598,7 @@ def test_cdist_same_inputs(self, device):
25982598
dist_grad = torch.randn((1, 27, 27), device=device, dtype=torch.float)
25992599
y = x.clone()
26002600
x.requires_grad = True
2601-
d = torch.cdist(x, y)
2601+
d = torch.cdist(x, y, p=p)
26022602
d.backward(dist_grad)
26032603
# Check that the backward pass does not contain invalid
26042604
# values such as nan or inf

0 commit comments

Comments
 (0)