Closed zhangjinyu19980915 closed 2 years ago
Hi, I encounterd the problem in train.py. How to solve this problem?
dgl._ffi.base.DGLError: [21:14:14] /opt/dgl/src/graph/heterograph_capi.cc:551: Check failed: component->Context() == ctx (cpu:0 vs. cuda:0) : Expect graphs to batch have the same contextcuda:0), but got cpu:0 Stack trace: [bt] (0) /home/zjy/miniconda3/envs/dgl/lib/python3.9/site-packages/dgl/libdgl.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x4f) [0x7f041e6f23bf] [bt] (1) /home/zjy/miniconda3/envs/dgl/lib/python3.9/site-packages/dgl/libdgl.so(+0xe16cd9) [0x7f041ef55cd9] [bt] (2) /home/zjy/miniconda3/envs/dgl/lib/python3.9/site-packages/dgl/libdgl.so(+0xe17384) [0x7f041ef56384] [bt] (3) /home/zjy/miniconda3/envs/dgl/lib/python3.9/site-packages/dgl/libdgl.so(DGLFuncCall+0x48) [0x7f041eed8518] [bt] (4) /home/zjy/miniconda3/envs/dgl/lib/python3.9/site-packages/dgl/_ffi/_cy3/core.cpython-39-x86_64-linux-gnu.so(+0x15f89) [0x7f041dc73f89] [bt] (5) /home/zjy/miniconda3/envs/dgl/lib/python3.9/site-packages/dgl/_ffi/_cy3/core.cpython-39-x86_64-linux-gnu.so(+0x1626b) [0x7f041dc7426b] [bt] (6) python(_PyObject_MakeTpCall+0x37f) [0x55a6c8ee69ef] [bt] (7) python(_PyEval_EvalFrameDefault+0x4a4) [0x55a6c8f6c8b4] [bt] (8) python(_PyFunction_Vectorcall+0x413) [0x55a6c8f25753]
hello, have you solved the problem?,I have the same problem today,could you please share your solution?
Hi, I encounterd the problem in train.py. How to solve this problem?
dgl._ffi.base.DGLError: [21:14:14] /opt/dgl/src/graph/heterograph_capi.cc:551: Check failed: component->Context() == ctx (cpu:0 vs. cuda:0) : Expect graphs to batch have the same contextcuda:0), but got cpu:0 Stack trace: [bt] (0) /home/zjy/miniconda3/envs/dgl/lib/python3.9/site-packages/dgl/libdgl.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x4f) [0x7f041e6f23bf] [bt] (1) /home/zjy/miniconda3/envs/dgl/lib/python3.9/site-packages/dgl/libdgl.so(+0xe16cd9) [0x7f041ef55cd9] [bt] (2) /home/zjy/miniconda3/envs/dgl/lib/python3.9/site-packages/dgl/libdgl.so(+0xe17384) [0x7f041ef56384] [bt] (3) /home/zjy/miniconda3/envs/dgl/lib/python3.9/site-packages/dgl/libdgl.so(DGLFuncCall+0x48) [0x7f041eed8518] [bt] (4) /home/zjy/miniconda3/envs/dgl/lib/python3.9/site-packages/dgl/_ffi/_cy3/core.cpython-39-x86_64-linux-gnu.so(+0x15f89) [0x7f041dc73f89] [bt] (5) /home/zjy/miniconda3/envs/dgl/lib/python3.9/site-packages/dgl/_ffi/_cy3/core.cpython-39-x86_64-linux-gnu.so(+0x1626b) [0x7f041dc7426b] [bt] (6) python(_PyObject_MakeTpCall+0x37f) [0x55a6c8ee69ef] [bt] (7) python(_PyEval_EvalFrameDefault+0x4a4) [0x55a6c8f6c8b4] [bt] (8) python(_PyFunction_Vectorcall+0x413) [0x55a6c8f25753]