Skip to content

Commit 99e5159

Browse files
author
Brennan Vincent
committed
fix test on cuda
1 parent 73e4aac commit 99e5159

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
@@ -9058,7 +9058,7 @@ def gen_nontrivial_input(num_src, dtype, device):
90589058
if TEST_NUMPY:
90599059
tup1 = torch.nonzero(tensor, as_tuple=True)
90609060
tup2 = tensor.nonzero(as_tuple=True)
9061-
np1 = tensor.numpy().nonzero()
9061+
np1 = tensor.cpu().numpy().nonzero()
90629062
for t in (tup1, tup2):
90639063
self.assertEqual(len(t), len(np1))
90649064
for i in range(len(t)):

0 commit comments

Comments
 (0)