From f4dd151037e4a534499f4e90ce918103f17436dd Mon Sep 17 00:00:00 2001 From: Brian Hirsh Date: Wed, 29 Jun 2022 09:30:37 -0700 Subject: [PATCH] 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 --- tests/test_texturing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_texturing.py b/tests/test_texturing.py index d76d15de..26350b54 100644 --- a/tests/test_texturing.py +++ b/tests/test_texturing.py @@ -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