[论文解读] Revisiting FPGA Acceleration of Molecular Dynamics Simulation with Dynamic Data Flow Behavior in High-Level Synthesis
本文重新探討使用高階合成(HLS)技術對分子動力學(MD)模擬進行FPGA加速,發現HLS工具對動態(條件式)資料流行為的不支援,導致性能相比RTL降低2倍。透過引入自動化RTL範本式流程,以支援資料驅動串流與PE陣列客製化,作者在Convey HC1ex FPGA平台上,於ApoA1基準測試中,實現相較12核心CPU的19.4倍加速與39倍能效提升。
Molecular dynamics (MD) simulation is one of the past decade's most important tools for enabling biology scientists and researchers to explore human health and diseases. However, due to the computation complexity of the MD algorithm, it takes weeks or even months to simulate a comparatively simple biology entity on conventional multicore processors. The critical path in molecular dynamics simulations is the force calculation between particles inside the simulated environment, which has abundant parallelism. Among various acceleration platforms, FPGA is an attractive alternative because of its low power and high energy efficiency. However, due to its high programming cost using RTL, none of the mainstream MD software packages has yet adopted FPGA for acceleration. In this paper we revisit the FPGA acceleration of MD in high-level synthesis (HLS) so as to provide affordable programming cost. Our experience with the MD acceleration demonstrates that HLS optimizations such as loop pipelining, module duplication and memory partitioning are essential to improve the performance, achieving a speedup of 9.5X compared to a 12-core CPU. More importantly, we observe that even the fully optimized HLS design can still be 2X slower than the reference RTL architecture due to the common dynamic (conditional) data flow behavior that is not yet supported by current HLS tools. To support such behavior, we further customize an array of processing elements together with a data-driven streaming network through a common RTL template, and fully automate the design flow. Our final experimental results demonstrate a 19.4X performance speedup and 39X energy efficiency for the widely used ApoA1 MD benchmark on the Convey HC1ex FPGA compared to a 12-core Intel Xeon server.
研究动机与目标
- 透過高階合成(HLS)技術降低開發時間,以應對基於FPGA的MD加速所面臨的高程式設計成本。
- 識別並診斷HLS工具在MD模擬中因缺乏對動態(條件式)資料流行為支援,所導致的效能瓶頸。
- 開發自動化設計流程,透過可重複使用的RTL範本,擴展HLS生成之設計,以支援動態資料流行為。
- 在維持HLS級程式設計能力的同時,達成與手動優化RTL設計相當的效能與能效表現。
- 在廣泛使用的ApoA1 MD基準測試上,於Convey HC1ex FPGA平台驗證所提流程之有效性。
提出的方法
- 從MD力學計算核心的基礎HLS實作出發,逐步套用HLS優化技術:迴圈流水線化、模組複製與記憶體分割。
- 使用共用的RTL範本,客製化處理元素(PE)陣列與資料驅動串流網路,以處理HLS工具原生不支援之動態資料流行為。
- 自動化整合增強後的RTL架構至HLS設計流程,使使用者得以維持在HLS環境中,同時獲得RTL級的效能表現。
- 透過調整複製之距離計算模組與力學計算模組的數量,優化設計空間,以平衡效能與面積成本。
- 於Convey HC1ex FPGA上實作並評估最終設計,與12核心Intel Xeon伺服器進行效能與能效比較。
实验结果
研究问题
- RQ1高階合成(HLS)單獨使用時,能在多大程度上達成與手動優化RTL設計相當的MD模擬加速效能?
- RQ2目前HLS工具在針對具動態資料流行為的MD模擬時,其關鍵效能限制為何?
- RQ3如何有效支援HLS生成設計中的動態(條件式)資料流行為——這類行為在MD力學計算中相當常見?
- RQ4自動化設計流程能否在無需手動RTL程式碼撰寫的情況下,彌補優化HLS與參考RTL架構之間的效能差距?
- RQ5結合HLS與針對性的RTL層級增強,於MD工作負載上能帶來哪些效能與能效提升?
主要发现
- 經過完整優化之HLS設計,相較12核心Intel Xeon CPU實現9.5倍加速,展現迴圈流水線化與模組複製等HLS優化技術之有效性。
- 儘管完成所有HLS優化,效能仍比參考RTL設計慢2倍,原因在於動態資料流行為未受支援,導致力學計算PE利用率僅約25%。
- 引入針對資料驅動串流與PE陣列設定之自訂RTL範本,成功實現處理元素之完全利用,徹底消除效能差距。
- 最終之HLS-RTL混合設計在Convey HC1ex FPGA上,相較12核心CPU伺服器實現19.4倍加速與39倍更高能效。
- 設計空間探索顯示,每組力學計算模組複製四組距離計算模組,可達最佳每單位面積效能,實現2.5倍加速與25%面積成本增加。
- 所提自動化流程成功以極少的手動RTL工作量生成高階效能加速器,使基於高階程式語言模型的實用FPGA MD模擬加速成為可能。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。