Hi,
I use the code of relational GCN(pytorch version)https://github.com/dmlc/dgl/tree/master/examples/pytorch/rgcn, an error occured when i feed in the data.
It happend in the file ‘model.py’ , line 47
h = layer(g, h, r, norm)
File “/research/dept6/yhlong/venv/lib64/python3.6/site-packages/torch/nn/modules/module.py”, line 547, in call
result = self.forward(*input, **kwargs)
File “/research/dept6/yhlong/venv/lib64/python3.6/site-packages/dgl/nn/pytorch/conv/relgraphconv.py”, line 180, in forward
g.update_all(self.message_func, fn.sum(msg=‘msg’, out=‘h’))
File “/research/dept6/yhlong/venv/lib64/python3.6/site-packages/dgl/graph.py”, line 2747, in update_all
Runtime.run(prog)
File “/research/dept6/yhlong/venv/lib64/python3.6/site-packages/dgl/runtime/runtime.py”, line 11, in run
exe.run()
File “/research/dept6/yhlong/venv/lib64/python3.6/site-packages/dgl/runtime/ir/executor.py”, line 204, in run
udf_ret = fn_data(src_data, edge_data, dst_data)
File “/research/dept6/yhlong/venv/lib64/python3.6/site-packages/dgl/runtime/scheduler.py”, line 949, in _mfunc_wrapper
return mfunc(ebatch)
File “/research/dept6/yhlong/venv/lib64/python3.6/site-packages/dgl/nn/pytorch/conv/relgraphconv.py”, line 133, in basis_message_func
msg = utils.bmm_maybe_select(edges.src[‘h’], weight, edges.data[‘type’])
File “/research/dept6/yhlong/venv/lib64/python3.6/site-packages/dgl/nn/pytorch/utils.py”, line 91, in bmm_maybe_select
return th.bmm(A.unsqueeze(1), BB).squeeze()
RuntimeError: arguments are located on different GPUs at /pytorch/aten/src/THC/generic/THCTensorMathBlas.cu:486
I used two GPUs to train
Pytorch version: 1.2.0
DGL version: 0.4.2
Maybe there are some problems with runing it in parallel?
Could someone help me with the question?
Thanks a lot!