一句话:微调大语言模型离线分析汇编上下文生成预取提示,指导轻量硬件预取器显著提升指令吞吐。
硬件数据预取是缓解现代处理器内存延迟的关键技术,但现有复杂预取算法仅依赖运行时信息,难以快速适应并理解更广的程序上下文。论文的关键洞察是:一条加载指令的最优预取策略往往可从其静态代码上下文中辨识,而这正是有经验的开发者所擅长的。基于此,作者提出 PF-LLM:一个经过微调的大语言模型,用于分析加载指令周围的汇编上下文并生成预取提示;这些离线生成的提示在运行时由 LMHint Prefetcher——一个轻量级硬件预取器集成——消费。该方法把“何时、如何、以多大力度预取”的困难决策从运行时硬件转移到离线的 LLM 分析中,使片上预取器成为零延迟、oracle 级别的系统。在内存密集型的 SPEC 2017 基准上,相比最先进硬件预取基线平均提升 9.8% IPC,相比最先进集成方法平均提升 18.9%,显示了用 LLM 指导微架构决策的巨大潜力。
Hardware data prefetching is a critical technique for mitigating memory latency in modern processors. While sophisticated hardware prefetching algorithms exist, their exclusive reliance on runtime information limits their ability to adapt quickly and comprehend broader program context. Our key insight is that the optimal prefetching strategy for a load instruction is often discernible from its static code context -- a task at which experienced developers excel. This motivates our central question: can a Large Language Model (LLM) be trained to perform this analysis automatically? We introduce PF-LLM, an LLM fine-tuned to analyze the assembly context surrounding a load instruction and generate prefetching hints. These offline-generated hints are consumed at runtime by LMHint Prefetcher, a lightweight hardware prefetcher ensemble designed to leverage this static guidance. Our approach boosts the performance of the on-chip hardware prefetcher by moving the hard ''when, how, and how aggressively to prefetch'' decisions out of the runtime hardware and into an offline LLM-powered analysis. This turns the on-chip prefetcher into a zero-latency, oracle-level system that always follows the best prefetching policy for every single load instruction. Our evaluation shows that our approach achieves a 9.8% instruction-per-cycle (IPC) improvement on average for memory-intensive SPEC 2017 benchmarks over state-of-the-art hardware prefetching baselines and 18.9% improvement on average over state-of-the-art ensemble methods, demonstrating the significant potential of leveraging LLMs to guide microarchitectural decisions.
@inproceedings{XuSLBWLX026,
title = {PF-LLM:
<u>L</u>
arge
<u>L</u>
anguage
<u>M</u>
odel Hinted Hardware
<u>P</u>
re
<u>f</u>
etching},
author = {Ceyu Xu and Xiangfeng Sun and Weihang Li and Chen Bai and Bangyan Wang and Mengming Li and Zhiyao Xie and Yuan Xie},
booktitle = {ASPLOS},
year = {2026},
doi = {10.1145/3779212.3790202}
}