TransformerConv RuntimeError: Not compiled with CUDA support #4245
Unanswered
roshandhakal
asked this question in
Q&A
Replies: 1 comment 8 replies
-
It looks like |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I can easily train my model with TransformerConv with my cpu. However, when gpu is enabled, it throws me this error. I don't know if its issue with my machine or TransformerConv itself. Can someone please help? Full traceback of the error:
`Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.8/dist-packages/envprep/scripts/gcn_train.py", line 164, in
main(args)
File "/usr/local/lib/python3.8/dist-packages/envprep/scripts/gcn_train.py", line 63, in main
out = model.forward(batch, device)
File "/usr/local/lib/python3.8/dist-packages/envprep/models/prepare_env_gcn.py", line 22, in forward
x = self.conv1(x, edge_index, edge_attr)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/torch_geometric/nn/conv/transformer_conv.py", line 176, in forward
out = self.propagate(edge_index, query=query, key=key, value=value,
File "/usr/local/lib/python3.8/dist-packages/torch_geometric/nn/conv/message_passing.py", line 317, in propagate
out = self.message(**msg_kwargs)
File "/usr/local/lib/python3.8/dist-packages/torch_geometric/nn/conv/transformer_conv.py", line 216, in message
alpha = softmax(alpha, index, ptr, size_i)
RuntimeError: The following operation failed in the TorchScript interpreter.
Traceback of TorchScript (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/torch_scatter/scatter.py", line 160, in softmax
return scatter_min(src, index, dim, out, dim_size)[0]
elif reduce == 'max':
return scatter_max(src, index, dim, out, dim_size)[0]
~~~~~~~~~~~ <--- HERE
else:
raise ValueError
File "/usr/local/lib/python3.8/dist-packages/torch_scatter/scatter.py", line 72, in scatter_max
out: Optional[torch.Tensor] = None,
dim_size: Optional[int] = None) -> Tuple[torch.Tensor, torch.Tensor]:
return torch.ops.torch_scatter.scatter_max(src, index, dim, out, dim_size)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
RuntimeError: Not compiled with CUDA support
Training Device: cuda`
Beta Was this translation helpful? Give feedback.
All reactions