Closed BEILOP closed 1 year ago
Hi @BEILOP, could you try the latest DGL version?
because i must read some files encoded in the old DGL version,These files cannot be read with the latest
孔明羽 @.***
------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2023年8月2日(星期三) 中午11:44 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [dmlc/dgl] dgl._ffi.base.DGLError: [17:19:38] /opt/dgl/src/runtime/c_runtime_api.cc:88: Check failed: allow_missing: Device API gpu is not enabled. Please install the cuda version of dgl. (Issue #6078)
Hi @BEILOP, could you try the latest DGL version?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
Did you install the CUDA version of DGL?
This issue has been automatically marked as stale due to lack of activity. It will be closed if no further activity occurs. Thank you
Hi, I am closing this issue assuming you are happy about our response. Feel free to follow up and reopen the issue if you have more questions with regard to our response.
dgl==0.9.0,torch==1.10.0,cuda=10.2 pytorch 10.2 INFO:root:Namespace(aggregator='mean', backprop_every=128, bs=1, cache_dim=32, cache_updater='gru', data='THA', dim=32, drop_out=0.2, embedding_module='graph_attention', gpu=0, hist_wind=7, leadtime=1, lr=0.001, max_pool=True, message_dim=32, message_function='identity', n_degree=10, n_epoch=20, n_head=2, n_layer=1, n_runs=1, patience=5, predwind=1, prefix='', uniform=False) pINFO:root:num of training instances: 316 INFO:root:start 0 epoch 0%| | 0/3 [00:00<?, ?it/s] Traceback (most recent call last): File "train.py", line 214, in
y_hat = model.predict(sources_batch, destinations_batch, edge_idxs_batch, timestamps_batch, batch_idx, story_ids_batch)
File "/home/jiaojiaxin/MTG/model/mtg.py", line 249, in predict
pred = self.gnn_model(t_list, all_nodes_cache, all_rels_cache)
File "/home/anaconda3/envs/mtg/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forwardcall(*input, **kwargs)
File "/home/jiaojiaxin/MTG/gnn/models.py", line 60, in forward
pred, idx, = self.__get_pred_embeds(t_list, ent_memory, rel_memory)
File "/home/jiaojiaxin/MTG/gnn/models.py", line 68, in get_pred_embeds
embed_seq_tensor, len_non_zero = self.aggregator(sorted_t, ent_memory, rel_memory, self.ent_embeds,
File "/home/anaconda3/envs/mtg/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/home/jiaojiaxin/MTG/gnn/aggregators.py", line 62, in forward
batched_g = batched_g.to(device) # torch.device('cuda:0')
File "/home/anaconda3/envs/mtg/lib/python3.8/site-packages/dgl/heterograph.py", line 5448, in to
ret._graph = self._graph.copy_to(utils.to_dgl_context(device))
File "/home/anaconda3/envs/mtg/lib/python3.8/site-packages/dgl/heterograph_index.py", line 236, in copy_to
return _CAPI_DGLHeteroCopyTo(self, ctx.device_type, ctx.device_id)
File "dgl/_ffi/_cython/./function.pxi", line 293, in dgl._ffi._cy3.core.FunctionBase.call__
File "dgl/_ffi/_cython/./function.pxi", line 225, in dgl._ffi._cy3.core.FuncCall
File "dgl/_ffi/_cython/./function.pxi", line 215, in dgl._ffi._cy3.core.FuncCall3
dgl._ffi.base.DGLError: [17:19:38] /opt/dgl/src/runtime/c_runtime_api.cc:88: Check failed: allow_missing: Device API gpu is not enabled. Please install the cuda version of dgl.
Stack trace:
[bt] (0) /home/anaconda3/envs/mtg/lib/python3.8/site-packages/dgl/libdgl.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x4f) [0x7fd1e344d29f]
[bt] (1) /home/anaconda3/envs/mtg/lib/python3.8/site-packages/dgl/libdgl.so(dgl::runtime::DeviceAPIManager::GetAPI(std::string, bool)+0x37c) [0x7fd1e371f72c]
[bt] (2) /home/anaconda3/envs/mtg/lib/python3.8/site-packages/dgl/libdgl.so(dgl::runtime::DeviceAPI::Get(DLContext, bool)+0x1f4) [0x7fd1e3719b14]
[bt] (3) /home/anaconda3/envs/mtg/lib/python3.8/site-packages/dgl/libdgl.so(dgl::runtime::NDArray::CopyFromTo(DLTensor, DLTensor, void)+0x242) [0x7fd1e373ac72]
[bt] (4) /home/anaconda3/envs/mtg/lib/python3.8/site-packages/dgl/libdgl.so(dgl::runtime::NDArray::CopyTo(DLContext const&, void const&) const+0xfb) [0x7fd1e377722b]
[bt] (5) /home/anaconda3/envs/mtg/lib/python3.8/site-packages/dgl/libdgl.so(dgl::UnitGraph::CopyTo(std::shared_ptr, DLContext const&, void const&)+0x317) [0x7fd1e3887fa7]
[bt] (6) /home/anaconda3/envs/mtg/lib/python3.8/site-packages/dgl/libdgl.so(dgl::HeteroGraph::CopyTo(std::shared_ptr, DLContext const&, void const&)+0x109) [0x7fd1e3789069]
[bt] (7) /home/anaconda3/envs/mtg/lib/python3.8/site-packages/dgl/libdgl.so(+0x4eb739) [0x7fd1e3796739]
[bt] (8) /home/anaconda3/envs/mtg/lib/python3.8/site-packages/dgl/libdgl.so(DGLFuncCall+0x48) [0x7fd1e37190e8]