File "/usr/local/lib/python3.7/dist-packages/dgl/heterograph.py", line 5709, in to
ret._graph = self._graph.copy_to(utils.to_dgl_context(device))
File "/usr/local/lib/python3.7/dist-packages/dgl/heterograph_index.py", line 255, in copy_to
return _CAPI_DGLHeteroCopyTo(self, ctx.device_type, ctx.device_id)
File "/usr/local/lib/python3.7/dist-packages/dgl/_ffi/_ctypes/function.py", line 219, in
call
ctypes.byref(ret_tcode),
File "/usr/local/lib/python3.7/dist-packages/dgl/_ffi/base.py", line 70, in check_call
raise DGLError(py_str(_LIB.DGLGetLastError()))
dgl._ffi.base.DGLError: [06:08:46] /opt/dgl/src/runtime/c_runtime_api.cc:82: Check failed: allow_missing: Device API cuda is not enabled. Please install the cuda version of dgl.
Stack trace:
[bt] (0) /usr/local/lib/python3.7/dist-packages/dgl/libdgl.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x75) [0x7e3ead73e8f5]
[bt] (1) /usr/local/lib/python3.7/dist-packages/dgl/libdgl.so(dgl::runtime::DeviceAPIManager::GetAPI(std::string, bool)+0x202) [0x7e3eadaada92]
[bt] (2) /usr/local/lib/python3.7/dist-packages/dgl/libdgl.so(dgl::runtime::DeviceAPI::Get(DGLContext, bool)+0x1e1) [0x7e3eadaaa071]
[bt] (3) /usr/local/lib/python3.7/dist-packages/dgl/libdgl.so(dgl::runtime::NDArray::Empty(std::vector<long, std::allocator<long> >, DGLDataType, DGLContext)+0x13b) [0x7e3eadac554b]
[bt] (4) /usr/local/lib/python3.7/dist-packages/dgl/libdgl.so(dgl::runtime::NDArray::CopyTo(DGLContext const&) const+0xc3) [0x7e3eadaffd53]
[bt] (5) /usr/local/lib/python3.7/dist-packages/dgl/libdgl.so(dgl::UnitGraph::CopyTo(std::shared_ptr<dgl::BaseHeteroGraph>, DGLContext const&)+0x3ff) [0x7e3eadc0d24f]
[bt] (6) /usr/local/lib/python3.7/dist-packages/dgl/libdgl.so(dgl::HeteroGraph::CopyTo(std::shared_ptr<dgl::BaseHeteroGraph>, DGLContext const&)+0xf6) [0x7e3eadb0c5d6]
[bt] (7) /usr/local/lib/python3.7/dist-packages/dgl/libdgl.so(+0x51b396) [0x7e3eadb1b396]
[bt] (8) /usr/local/lib/python3.7/dist-packages/dgl/libdgl.so(DGLFuncCall+0x48) [0x7e3eadaa92a8]
I’m trying 3.5 python version but not installed and tried different dgl versions bit nothing happened.
Ayesha Mehar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.