How to solve this problem

File “/usr/local/lib/python3.10/dist-packages/torch/cuda/amp/autocast_mode.py”, line 106, in decorate_fwd
return fwd(*args, **kwargs)
File “/home/niharika/.local/lib/python3.10/site-packages/dgl-0.10-py3.10-linux-x86_64.egg/dgl/backend/pytorch/sparse.py”, line 106, in forward
out, (argX, argY) = _gspmm(gidx, op, reduce_op, X, Y, xdata)
File “/home/niharika/.local/lib/python3.10/site-packages/dgl-0.10-py3.10-linux-x86_64.egg/dgl/sparse.py”, line 228, in _gspmm
_CAPI_DGLKernelSpMM(gidx, op, reduce_op,
File “/home/niharika/.local/lib/python3.10/site-packages/dgl-0.10-py3.10-linux-x86_64.egg/dgl/_ffi/_ctypes/function.py”, line 188, in call
check_call(_LIB.DGLFuncCall(
File “/home/niharika/.local/lib/python3.10/site-packages/dgl-0.10-py3.10-linux-x86_64.egg/dgl/_ffi/base.py”, line 65, in check_call
raise DGLError(py_str(LIB.DGLGetLastError()))
dgl.ffi.base.DGLError: [23:26:06] /home/niharika/dataset/dgl/include/dgl/./runtime/packed_func.h:397: Check failed: type_code == kNDArrayContainer (8 vs. 13) : expected NDArrayContainer but get ObjectHandle
Stack trace:
[bt] (0) /home/niharika/.local/lib/python3.10/site-packages/dgl-0.10-py3.10-linux-x86_64.egg/dgl/libdgl.so(+0x2a68ea) [0x7effa5a9e8ea]
[bt] (1) /home/niharika/.local/lib/python3.10/site-packages/dgl-0.10-py3.10-linux-x86_64.egg/dgl/libdgl.so(dgl::runtime::DGLPODValue
::operator dgl::runtime::NDArray() const+0x195) [0x7effa5acce85]
[bt] (2) /home/niharika/.local/lib/python3.10/site-packages/dgl-0.10-py3.10-linux-x86_64.egg/dgl/libdgl.so(+0x54b776) [0x7effa5d43776]
[bt] (3) /home/niharika/.local/lib/python3.10/site-packages/dgl-0.10-py3.10-linux-x86_64.egg/dgl/libdgl.so(+0x54cae5) [0x7effa5d44ae5]
[bt] (4) /home/niharika/.local/lib/python3.10/site-packages/dgl-0.10-py3.10-linux-x86_64.egg/dgl/libdgl.so(DGLFuncCall+0x69) [0x7effa5d825f9]
[bt] (5) /lib/x86_64-linux-gnu/libffi.so.8(+0x7e2e) [0x7f014e902e2e]
[bt] (6) /lib/x86_64-linux-gnu/libffi.so.8(+0x4493) [0x7f014e8ff493]
[bt] (7) /usr/lib/python3.10/lib-dynload/_ctypes.cpython-310-x86_64-linux-gnu.so(+0xa451) [0x7f014dda9451]
[bt] (8) /usr/lib/python3.10/lib-dynload/_ctypes.cpython-310-x86_64-linux-gnu.so(+0x9a68) [0x7f014dda8a68]

Could you provide a minimal script to reproduce the issue? Otherwise it’s hard to investigate.

raise DGLError(py_str(LIB.DGLGetLastError()))
dgl.ffi.base.DGLError: [23:26:06] ~/dgl/include/dgl/./runtime/packed_func.h:397: Check failed: type_code == kNDArrayContainer (8 vs. 13) : expected NDArrayContainer but get ObjectHandle. I am passing NDArray in _CAPI_DGLKernelSpMM() but it showing this error message

I was referring to the python file you used that triggered the issue.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.