Skip to content

Commit 73a14d7

Browse files
bottlerfacebook-github-bot
authored andcommitted
dataparallel fix
Summary: Attempt to overcome flaky test Reviewed By: patricklabatut Differential Revision: D31895560 fbshipit-source-id: 1ecbb1782b0eafe132f88425c48487c2d0e10d2d
1 parent bee31c4 commit 73a14d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_render_multigpu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ def forward(self, verts, texs):
159159
verts = ico_sphere(3).verts_padded()
160160
texs = verts.new_ones(verts.shape)
161161
model = Model()
162+
model.to(GPU_LIST[0])
162163
model = nn.DataParallel(model, device_ids=GPU_LIST)
163-
model.to(f"cuda:{model.device_ids[0]}")
164164

165165
# Test a few iterations
166166
for _ in range(100):

0 commit comments

Comments
 (0)