A Practical GPU Based KNN Algorithm

The KNN algorithm is a widely applied method for classification in machine learning and pattern recognition. However, we can't be able to get a satisfactory performance in many applications, as the KNN algorithm has a high computational complexity. Recent developments in programmable, highly paralleled Graphics Processing Units (GPU) have opened a new era of parallel computing which deliver tremendous computational horsepower in a single chip. In this paper, we describe a practical GPU based K Nearest Neighbor (KNN) algorithm implemented by CUDA. In our algorithm, a data segmentation method has introduced in the distances computation step to adapt to the CUDA thread model and memory hierarchy. We obtain highly increase in performance compared to ordinary CPU version.

[1]  Mark J. Harris,et al.  Parallel Prefix Sum (Scan) with CUDA , 2011 .

[2]  Sam S. Stone,et al.  MCUDA: An Efficient Implementation of CUDA Kernels on Multi-cores , 2011 .

[3]  Jae-Woo Chang,et al.  Advances in Web-Age Information Management , 2001, Lecture Notes in Computer Science.

[4]  Philippas Tsigas,et al.  A Practical Quicksort Algorithm for Graphics Processors , 2008, ESA.

[5]  Sunil Arya,et al.  An optimal algorithm for approximate nearest neighbor searching fixed dimensions , 1998, JACM.

[6]  P. J. Narayanan,et al.  Fast and scalable list ranking on the GPU , 2009, ICS.

[7]  Enhua Wu,et al.  Emerging technology about GPGPU , 2008, APCCAS 2008 - 2008 IEEE Asia Pacific Conference on Circuits and Systems.

[8]  Michael Garland,et al.  Designing efficient sorting algorithms for manycore GPUs , 2009, 2009 IEEE International Symposium on Parallel & Distributed Processing.

[9]  Ian Buck GPU Computing: Programming a Massively Parallel Processor , 2007, International Symposium on Code Generation and Optimization (CGO'07).

[10]  Sunil Arya,et al.  ANN: library for approximate nearest neighbor searching , 1998 .

[11]  Anthony K. H. Tung,et al.  Scalable Clustering Using Graphics Processors , 2006, WAIM.

[12]  Bingsheng He,et al.  Parallel Data Mining on Graphics Processors , 2011 .

[13]  Michel Barlaud,et al.  Fast k nearest neighbor search using GPU , 2008, 2008 IEEE Computer Society Conference on Computer Vision and Pattern Recognition Workshops.

[14]  Xiaowen Chu,et al.  Practical Random Linear Network Coding on GPUs , 2009, Networking.

[15]  Xiaowen Chu,et al.  Massively Parallel Network Coding on GPUs , 2008, 2008 IEEE International Performance, Computing and Communications Conference.