arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 0906.0231cs.IRcs.DScs.NE
收藏

在多图形处理器上求解$k$ -最近邻问题

Solving $k$-Nearest Neighbor Problem on Multiple Graphics Processors

Kimikazu Kato, Tikara Hosino

摘要:

推荐系统是一个从已知的偏好中预测顾客未知偏好的软件系统。在推荐系统中,客户的偏好被编码成向量,找到与每个向量最近的向量是一个重要的部分。这个问题的向量搜索部分称为$k$ -最近邻问题。我们给出了一个有效的算法来解决这个问题的多个图形处理器单元(GPU)。我们的算法包括两个部分:一个$N$体问题和一个部分排序。对于$N$ -体问题的算法,我们采用了物理学中已知的$N$ -体问题算法的思想,但需要另一个技巧来克服共享内存小的问题。对于部分排序,我们给出了一个新的GPU算法,这是有效的小$k$。在我们的部分排序算法中,一个堆是由线程以低同步成本并行访问的。我们的算法的这两个部分都利用了合并内存访问的最大功率,从而实现了全带宽。通过一个实验,我们表明,当问题的大小是大的,在两个GPU上的算法的实现运行速度超过330倍,比一个最新的CPU上的单核实现。我们还表明,我们的算法的规模以及相对于GPU的数量。

英文摘要:

The recommendation system is a software system to predict customers' unknown preferences from known preferences. In the recommendation system, customers' preferences are encoded into vectors, and finding the nearest vectors to each vector is an essential part. This vector-searching part of the problem is called a $k$-nearest neighbor problem. We give an effective algorithm to solve this problem on multiple graphics processor units (GPUs). Our algorithm consists of two parts: an $N$-body problem and a partial sort. For a algorithm of the $N$-body problem, we applied the idea of a known algorithm for the $N$-body problem in physics, although another trick is need to overcome the problem of small sized shared memory. For the partial sort, we give a novel GPU algorithm which is effective for small $k$. In our partial sort algorithm, a heap is accessed in parallel by threads with a low cost of synchronization. Both of these two parts of our algorithm utilize maximal power of coalesced memory access, so that a full bandwidth is achieved. By an experiment, we show that when the size of the problem is large, an implementation of the algorithm on two GPUs runs more than 330 times faster than a single core implementation on a latest CPU. We also show that our algorithm scales well with respect to the number of GPUs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑