用LLVM和机器学习预测早期代码执行时间,误差仅12%。
PrETi: Predicting Execution Time in Early Stage with LLVM and Machine Learning
- 基于LLVM模拟提取指令数等运行时信息,训练预测模型。
- 引入缓存和分支预测模拟,平均绝对误差达11.98%。
- 适合开发初期性能评估,提升编译优化效率。
我们提出preti,一个用于软件开发早期阶段预测执行时间的新框架。preti利用基于LLVM的仿真环境提取与时间相关的运行时信息,如执行的LLVM IR指令数量。这些信息结合历史执行时间数据,用于训练机器学习模型以实现精确的时间预测。为进一步提升预测准确性,该方法还引入了缓存访问和分支预测的模拟。在公开基准测试上的评估表明,preti实现了11.98%的平均绝对百分比误差(APE),优于现有最先进方法。结果证明preti在早期阶段定时分析中具有高效性和鲁棒性。
原文摘要 · Abstract (English)
We introduce preti, a novel framework for predicting software execution time during the early stages of development. preti leverages an LLVM-based simulation environment to extract timing-related runtime information, such as the count of executed LLVM IR instructions. This information, combined with historical execution time data, is utilized to train machine learning models for accurate time prediction. To further enhance prediction accuracy, our approach incorporates simulations of cache accesses and branch prediction. The evaluations on public benchmarks demonstrate that preti achieves an average Absolute Percentage Error (APE) of 11.98\%, surpassing state-of-the-art methods. These results underscore the effectiveness and efficiency of preti as a robust solution for early-stage timing analysis.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。