《電子技術應用》
您所在的位置:首頁 > 其他 > 设计应用 > 基于CPU-FPGA异构系统的排序算法加速
基于CPU-FPGA异构系统的排序算法加速
2022年电子技术应用第1期
寇远博,邱泽宇,王 亮,黄建强
青海大学 计算机技术与应用系,青海 西宁810016
摘要: 传统的排序方法主要以软件串行的方式实现,包括冒泡排序、选择排序等。这些算法往往采用顺序比较,运算的时间复杂度较高。近年来已经提出了一些并行度较高的排序算法,但是由于CPU的硬件特点,不能很好地利用这些算法的并行性。而FPGA具有良好的灵活性、并行性和集成性等特点,因此在FPGA上可以更好地发挥这些并行算法的优势,从而大大提高数据排序的实时性。基于此设计了一个CPU-FPGA异构系统,将一些排序算法移植到FPGA上,并进行功能验证和理论性能评估。结果显示,该系统对于并行性高的排序算法具有良好的加速效果,但逻辑资源消耗巨大,适用于实时性要求高的算法加速场景。
中圖分類號: TP302.7
文獻標識碼: A
DOI:10.16157/j.issn.0258-7998.212431
中文引用格式: 寇遠博,邱澤宇,王亮,等. 基于CPU-FPGA異構(gòu)系統(tǒng)的排序算法加速[J].電子技術應用,2022,48(1):18-23,30.
英文引用格式: Kou Yuanbo,Qiu Zeyu,Wang Liang,et al. Sorting algorithm acceleration based on CPU-FPGA heterogeneous system[J]. Application of Electronic Technique,2022,48(1):18-23,30.
Sorting algorithm acceleration based on CPU-FPGA heterogeneous system
Kou Yuanbo,Qiu Zeyu,Wang Liang,Huang Jianqiang
Department of Computer Technology and Applications,Qinghai University,Xining 810016,China
Abstract: Traditional sorting methods are mainly implemented in software serial mode, including bubble sorting, selective sorting and so on. These algorithms often use sequential comparison, and the operation time complexity is relatively high. In recent years, some sorting algorithms with a high degree of parallelism have been proposed, but due to the hardware characteristics of the CPU, the parallelism of these algorithms cannot be used well. And FPGA has the characteristics of good flexibility, parallelism and integration, so the advantages of these parallel algorithms can be better utilized on FPGA, thereby greatly improving the real-time performance of data sorting. Based on this, the paper designs a CPU-FPGA heterogeneous system, transplants some sorting algorithms to FPGA, and performs functional verification and theoretical performance evaluation. The results show that the system has a good acceleration effect for sorting algorithms with high parallelism, but consumes huge logic resources, and is suitable for algorithm acceleration scenarios with high real-time requirements.
Key words : FPGA;sorting algorithm;heterogeneous system;algorithm acceleration

0 引言

    排序問題是計算機科學中的經(jīng)典問題,人們已對此提出了許多解決辦法。而大規(guī)模數(shù)據(jù)的排序問題仍然是一個困難的問題。這一問題廣泛發(fā)生在圖計算領域,如社交網(wǎng)絡、推薦系統(tǒng)等[1]。

    傳統(tǒng)的計算平臺CPU和GPU存在計算效率低和高功耗的問題,不能很好地滿足圖計算領域的計算需求。為了解決這一問題,研究者們采用定制硬件平臺來進行圖數(shù)據(jù)的處理和算法的加速[2]。其中,基于FPGA的圖計算加速器因滿足復雜性高、數(shù)據(jù)規(guī)模大和基本操作多變的圖計算的性能要求[3]受到青睞。

    目前,國內(nèi)外已經(jīng)存在大量的基于FPGA的硬件加速器。GraphOps[4]提供了一個硬件庫,可以讓用戶快速且輕松地構(gòu)造用于圖分析算法的節(jié)能型加速器。FlashGraph[5]在具有極端并行性的SSD文件系統(tǒng)之上實現(xiàn)了圖處理引擎,它可以在性能損失最小的情況下利用SSD處理超大規(guī)模的圖數(shù)據(jù)。FPGA開發(fā)門檻較高,但如果使用ThunderGP[6],開發(fā)人員只需要使用C++編寫API函數(shù),ThunderGP就會自動生成一個高性能的加速器,極為方便。大規(guī)模世界圖往往具有強大的社區(qū)結(jié)構(gòu),其中一小部分頂點比其他頂點的訪問頻率更高,利用這一潛在局部性,可以大幅提高圖計算的性能[7]。除了單機圖計算系統(tǒng),一些典型的分布式的圖計算系統(tǒng),如ForeGraph[8]和FPGP[9],也可以處理超大規(guī)模的數(shù)據(jù)。




本文詳細內(nèi)容請下載:http://m.ihrv.cn/resource/share/2000003903




作者信息:

寇遠博,邱澤宇,王  亮,黃建強

(青海大學 計算機技術與應用系,青海 西寧810016)




wd.jpg

此內(nèi)容為AET網(wǎng)站原創(chuàng),未經(jīng)授權(quán)禁止轉(zhuǎn)載。

相關內(nèi)容