Commit ed1854e8 authored by Gan Quan's avatar Gan Quan Committed by Minjie Wang
Browse files

[Bugfix] fix a potential context mismatch (#154)

parent 53b9a4bd
...@@ -348,8 +348,9 @@ class SendRecvExecutor(BasicExecutor): ...@@ -348,8 +348,9 @@ class SendRecvExecutor(BasicExecutor):
dat = F.squeeze(dat, dim=1) dat = F.squeeze(dat, dim=1)
else: else:
dat = F.ones((len(self.u), ), dtype=F.float32, ctx=ctx) dat = F.ones((len(self.u), ), dtype=F.float32, ctx=ctx)
adjmat = F.sparse_matrix(dat, ('coo', self.graph_idx), self.graph_shape) adjmat = F.sparse_matrix(
return F.copy_to(adjmat, ctx) dat, ('coo', F.copy_to(self.graph_idx, ctx)), self.graph_shape)
return adjmat
class BundledExecutor(BasicExecutor): class BundledExecutor(BasicExecutor):
......
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