pytorch_geometric
pytorch_geometric copied to clipboard
knn_graph error , because the scalar of k is too large?
🐛 Describe the bug
I use knn_graph
, and the parameter k=2000, then the error appeared:
RuntimeError: k <= 100INTERNAL ASSERT FAILED at "csrc/cuda/knn_cuda.cu":98, please report a bug to PyTorch. `k` needs to smaller than or equal to 100
Environment
- PyG version: 2.0.4
- PyTorch version: 1.10
- OS: windows
- Python version: 3.9.7
- CUDA/cuDNN version: 11.1
- How you installed PyTorch and PyG (
conda
,pip
, source): conda - Any other relevant information (e.g., version of
torch-scatter
):
Our knn_cuda
implementation stores the neighbors for each node/thread in private local memory. As such, there is an upper bound in the number of neighbors.