Using CUDA programming for parallel acceleration, efficient K-nearest neighbors (KNN) can be implemented
The testing environment is: pytorch, python3+, CUDA programming
Tested with cuda 11.7, python 3.7.16, pytorch 1.13.1, gcc 11.2.0
# clone the tool project
git clone https://github.com/upc-ghy/KNN.git
# cd KNN
cd KNN/
# install
sudo python setup.py install
python test.py