arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2408.05314cs.LGcs.AIcs.AR
收藏

rule4ml:一款用于FPGA上ML模型资源利用率与延迟估算的开源工具

rule4ml: An Open-Source Tool for Resource Utilization and Latency Estimation for ML Models on FPGA

Interdisciplinary Institute for Technological Innovation(跨学科技术创新研究院);Université de Sherbrooke(谢布鲁克大学)

Mohammad Mehdi Rahimifar, Hamza Ezzaoui Rahali, Audrey C. Therrien

AI总结:

针对FPGA上ML模型开发需反复综合评估导致效率低的问题,提出基于HLS4ML训练回归模型的rule4ml工具,可在综合前预测FPGA资源占用与推理延迟,准确率较高,能加速开发部署。

摘要:

在现场可编程门阵列(Field-Programmable Gate Array, FPGA)上部署机器学习(Machine Learning, ML)模型作为低延迟、低功耗的解决方案,正越来越广泛地应用于各个领域,可帮助处理由性能持续提升的探测器生成的大量数据。然而,为FPGA开发ML模型十分耗时,因为优化过程需要通过综合来评估FPGA的面积和延迟,导致流程缓慢且重复。本文提出了一种新方法,可在神经网络(Neural Networks, NNs)在FPGA上进行综合和实现之前,预测其资源利用率和推理延迟。我们借助HLS4ML(一种可将神经网络转换为高级综合(High-Level Synthesis, HLS)代码的工具流),对多样化的神经网络架构数据集进行综合,并训练资源利用率与推理延迟预测器。HLS4ML需要完整综合才能获取资源和延迟信息,而我们的方法使用训练好的回归模型,可在综合前即时完成预测。这些预测模型可估算块随机存取存储器(Block RAM, BRAM)、数字信号处理器(Digital Signal Processors, DSP)、触发器(Flip-Flops, FF)和查找表(Look-Up Tables, LUT)的使用量,以及推理时钟周期。我们在合成架构和现有基准架构上对预测器进行了评估,结果显示其具有较高的准确率:验证集上的R²分数在0.8到0.98之间,对称平均绝对百分比误差(sMAPE)在10%到30%之间。总体而言,我们的方法提供了有价值的初步参考,使用户能够快速评估神经网络在FPGA上的可行性和效率,加快开发与部署流程。该开源仓库可在https://github.com/IMPETUS-UdeS/rule4ml获取,数据集则在https://borealisdata.ca/dataverse/rule4ml 公开提供。

英文摘要:

Implementing Machine Learning (ML) models on Field-Programmable Gate Arrays (FPGAs) is becoming increasingly popular across various domains as a low-latency and low-power solution that helps manage large data rates generated by continuously improving detectors. However, developing ML models for FPGAs is time-consuming, as optimization requires synthesis to evaluate FPGA area and latency, making the process slow and repetitive. This paper introduces a novel method to predict the resource utilization and inference latency of Neural Networks (NNs) before their synthesis and implementation on FPGA. We leverage HLS4ML, a tool-flow that helps translate NNs into high-level synthesis (HLS) code, to synthesize a diverse dataset of NN architectures and train resource utilization and inference latency predictors. While HLS4ML requires full synthesis to obtain resource and latency insights, our method uses trained regression models for immediate pre-synthesis predictions. The prediction models estimate the usage of Block RAM (BRAM), Digital Signal Processors (DSP), Flip-Flops (FF), and Look-Up Tables (LUT), as well as the inference clock cycles. The predictors were evaluated on both synthetic and existing benchmark architectures and demonstrated high accuracy with R2 scores ranging between 0.8 and 0.98 on the validation set and sMAPE values between 10% and 30%. Overall, our approach provides valuable preliminary insights, enabling users to quickly assess the feasibility and efficiency of NNs on FPGAs, accelerating the development and deployment processes. The open-source repository can be found at https://github.com/IMPETUS-UdeS/rule4ml, while the datasets are publicly available at https://borealisdata.ca/dataverse/rule4ml.

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

↑