pytorch_knn_cuda
pytorch_knn_cuda copied to clipboard
Illegal memory access with large N*M
Tried on 10,000 reference points, 100 query points, and 3 feature dimensions, this crashes with the error:
RuntimeError: cuda runtime error (77) : an illegal memory access was encountered at /pytorch/torch/lib/THC/generic/THCTensorCopy.c:70
The error does not appear when executing the KNN code, but only when trying to assign or access any data on the GPU (including the results) after the code is called. Tested with GeForce GTX 1080 with 8 GB of VRAM.
I am facing the exact same issue have you found any solution??
Bump
Same problem.
I suspect I found the source of this issue:
The algorithm computes ALL pair-wise distances ref_nb
xquery_nb
, however, the space allocated for these distances is only k
xquery_nb
therefore there is a memory leak.
I forked this repository here and fixed this problem there.
Same problem...
I suspect I found the source of this issue: The algorithm computes ALL pair-wise distances
ref_nb
xquery_nb
, however, the space allocated for these distances is onlyk
xquery_nb
therefore there is a memory leak. I forked this repository here and fixed this problem there.
Thanks, Bagon. Your fork works well now.