fix internal index.Tensor test on wrong device

Summary: After landing https://github.com/pytorch/pytorch/pull/69607, that made it an error to use indexing with `cpu_tensor[cuda_indices]`. There was one outstanding test in fbcode that incorrectly used indexing in that way, which is fixed here

Reviewed By: bottler, osalpekar

Differential Revision: D37128838

fbshipit-source-id: 611b6f717b5b5d89fa61fd9ebeb513ad7e65a656
This commit is contained in:
Brian Hirsh 2022-06-29 09:30:37 -07:00 committed by Facebook GitHub Bot
parent 7ce8ed55e1
commit f4dd151037

View File

@ -131,7 +131,7 @@ class TestTexturesVertex(TestCaseMixin, unittest.TestCase):
)
# define TexturesVertex
verts_texture = torch.rand(verts.shape)
verts_texture = torch.rand(verts.shape, device=device)
textures = TexturesVertex(verts_features=verts_texture)
# compute packed faces