Skip to content

Commit f4dd151

Browse files
bdhirshfacebook-github-bot
authored andcommitted
fix internal index.Tensor test on wrong device
Summary: After landing pytorch/pytorch#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
1 parent 7ce8ed5 commit f4dd151

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_texturing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def test_faces_verts_textures(self):
131131
)
132132

133133
# define TexturesVertex
134-
verts_texture = torch.rand(verts.shape)
134+
verts_texture = torch.rand(verts.shape, device=device)
135135
textures = TexturesVertex(verts_features=verts_texture)
136136

137137
# compute packed faces

0 commit comments

Comments
 (0)