Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could you please tell me how to fix the bug? #5

Open
qiaoranliqu opened this issue Jul 20, 2022 · 3 comments
Open

Could you please tell me how to fix the bug? #5

qiaoranliqu opened this issue Jul 20, 2022 · 3 comments

Comments

@qiaoranliqu
Copy link

File "UAI1_full_resolution.py", line 278, in
out = model(batch)
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "UAI1_full_resolution.py", line 36, in forward
x = F.relu(self.conv1(x, edge_index, edge_attr))
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/root/graph-pde-master/graph-neural-operator/nn_conv.py", line 271, in forward
return self.propagate(edge_index, x=x, pseudo=pseudo)
File "/root/miniconda3/lib/python3.8/site-packages/torch_geometric/nn/conv/message_passing.py", line 317, in propagate
out = self.message(**msg_kwargs)
File "/root/graph-pde-master/graph-neural-operator/nn_conv.py", line 274, in message
weight = self.nn(pseudo).view(-1, self.in_channels, self.out_channels)
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/root/graph-pde-master/graph-neural-operator/utilities.py", line 226, in forward
x = l(x)
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/activation.py", line 98, in forward
return F.relu(input, inplace=self.inplace)
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/functional.py", line 1442, in relu
result = torch.relu(input)
RuntimeError: CUDA out of memory. Tried to allocate 1.44 GiB (GPU 0; 23.70 GiB total capacity; 20.41 GiB already allocated; 18.56 MiB free; 21.69 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

We implement the code on Cloud Platform and the cost of GPU exceeds 24GiB, so could you tell us the capacity of your GPU?

@dericknganyu
Copy link

Reduce the batch size you use per epoch. This should solve the issue

@freebob
Copy link

freebob commented Apr 12, 2023

I also encountered the same problem, how did you solve it?thx

@bazziamir24
Copy link

Reduce the batch size and try to clean up catch in the CUDA manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants