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

Infinite loop in torch_cluster.graclus_cluster on empty inputs? #166

Open
ssrothman opened this issue Mar 13, 2023 · 2 comments
Open

Infinite loop in torch_cluster.graclus_cluster on empty inputs? #166

ssrothman opened this issue Mar 13, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@ssrothman
Copy link

When calling graclus_cluster(row, col, weight, numnodes) on empty input, the call hangs. In particular by "empty inputs" I mean inputs like: row=torch.Tensor([]), col=torch.Tensor([]), weight=torch.Tensor([]), numnodes=some positive integer. While the call is hanging nvidia-smi still shows substantial GPU utilization, suggesting to me that there is some unintended infinite loop running on the GPU in this case. This is probably not a super important edge case (I was only calling the function with empty inputs due to a bug in my data handling which has since been fixed), but I thought it was worth notifying the developers, as I assume this is not the intended failure mode.

My environment is:

mamba list | grep torch
ffmpeg                    4.3                  hf484d3e_0    pytorch
pyg                       2.2.0           py38_torch_1.13.0_cu116    pyg
pytorch                   1.13.1          py3.8_cuda11.6_cudnn8.3.2_0    pytorch
pytorch-cluster           1.6.0           py38_torch_1.13.0_cu116    pyg
pytorch-cuda              11.6                 h867d48c_1    pytorch
pytorch-mutex             1.0                        cuda    pytorch
pytorch-scatter           2.1.0           py38_torch_1.13.0_cu116    pyg
pytorch-sparse            0.6.15          py38_torch_1.13.0_cu116    pyg
torchaudio                0.13.1               py38_cu116    pytorch
torchvision               0.14.1               py38_cu116    pytorch
@rusty1s
Copy link
Owner

rusty1s commented Mar 15, 2023

Thanks for reporting. Indeed, currently graclus_cluster assumes a well-defined graph. We could probably error out early in this we see empty inputs.

@github-actions
Copy link

This issue had no activity for 6 months. It will be closed in 2 weeks unless there is some new activity. Is this issue already resolved?

@github-actions github-actions bot added the stale label Sep 12, 2023
@rusty1s rusty1s added bug Something isn't working and removed stale labels Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants