Commit 5d944430 authored by Jeremy Reizenstein's avatar Jeremy Reizenstein Committed by Facebook GitHub Bot
Browse files

fix graph_conv test

Summary: The recently added part of a test was assuming that the random gpu was gpu 0.

Reviewed By: nikhilaravi

Differential Revision: D22948397

fbshipit-source-id: 88107e19fc3118e763f95be43a614941176a08f9
parent 7944d24d
......@@ -113,7 +113,7 @@ class TestGraphConv(TestCaseMixin, unittest.TestCase):
neighbor_sums_cpu = gather_scatter(verts_cpu, edges_cpu, False)
neighbor_sums = gather_scatter_python(verts, edges, False)
randoms = torch.rand_like(neighbor_sums)
(neighbor_sums_cuda * randoms.cuda()).sum().backward()
(neighbor_sums_cuda * randoms.to(device)).sum().backward()
(neighbor_sums_cpu * randoms).sum().backward()
(neighbor_sums * randoms).sum().backward()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment