首页 | 官方网站   微博 | 高级检索  
     

基于OpenCL的并行kNN算法设计与实现
引用本文:杨朋霖,冯百明,周志阳,温向慧.基于OpenCL的并行kNN算法设计与实现[J].计算机工程与科学,2017,39(12):2198-2202.
作者姓名:杨朋霖  冯百明  周志阳  温向慧
作者单位:;1.西北师范大学计算机科学与工程学院
基金项目:国家自然科学基金(61462076)
摘    要:kNN算法是机器学习和数据挖掘程序中经常使用的经典算法。随着数据量的增大,kNN算法的执行时间急剧上升。为了有效利用现代计算机的GPU等计算单元减少kNN算法的计算时间,提出了一种基于OpenCL的并行kNN算法,该算法对距离计算和排序两个瓶颈点进行并行化,在距离计算阶段使用细粒度并行化策略和优化的线程模型,排序阶段使用优化内存模型的双调排序。以UCI数据集letter为测试集,分别使用E8400和GTS450运行kNN算法进行测试,采用GPU加速的并行kNN算法的计算速度比CPU版提高了40.79倍。

关 键 词:OpenCL  GPU  kNN  双调排序  
收稿时间:2016-05-05
修稿时间:2017-12-25

A parallel kNN algorithm based on OpenCL
YANG Peng-lin,FENG Bai-ming,ZHOU Zhi-yang,WEN Xiang-hui.A parallel kNN algorithm based on OpenCL[J].Computer Engineering & Science,2017,39(12):2198-2202.
Authors:YANG Peng-lin  FENG Bai-ming  ZHOU Zhi-yang  WEN Xiang-hui
Affiliation:(College of Computer Science and Engineering,Northwest Normal University,Lanzhou 730070,China)
Abstract:The kNN algorithm is a classical algorithm often used in machine learning and data mining programs. With the increasing amount of data, the execution time of the kNN algorithm increases sharply. In order to effectively utilize GPU and other computing units of modern computers to reduce the computation time of the kNN algorithm, we present a parallel kNN algorithm based on OpenCL, which parallelizes the two segments of bottleneck code: distance calculation and sorting. The algorithm adopts the fine-grained parallelization strategy and the optimized memory model in the phase of distance calculation and uses bitonic sort that can optimize memory model in the phase of sorting. We use Letter, one of UCI datasets, as the test set and E8400 AND GTS450 to run the kNN algorithm for testing. The computing speed of the parallel kNN algorithm accelerated by GPU is 40.79 times faster than that of its CPU version.
Keywords:OpenCL  GPU  kNN  bitonic sort  
点击此处可从《计算机工程与科学》浏览原始摘要信息
点击此处可从《计算机工程与科学》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司    京ICP备09084417号-23

京公网安备 11010802026262号