Skip to content

Commit

Permalink
fix internal index.Tensor test on wrong device
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bdhirsh authored and facebook-github-bot committed Jun 29, 2022
1 parent 7ce8ed5 commit f4dd151
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_texturing.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def test_faces_verts_textures(self):
)

# 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
Expand Down

0 comments on commit f4dd151

Please sign in to comment.