CacheMind: 从缺失率到原因 -- 基于自然语言和跟踪数据的缓存替换推理
CacheMind: From Miss Rates to Why -- Natural-Language, Trace-Grounded Reasoning for Cache Replacement
AI总结:
CacheMind通过自然语言和跟踪数据推理提升缓存替换性能,实现高准确率和实际应用效果。
摘要:
缓存替换仍然是CPU微架构中的一个具有挑战性的问题,通常通过手工编写的启发式方法来解决,限制了缓存性能。缓存数据分析需要解析数百万个跟踪条目并进行手动过滤,使过程变得缓慢且非交互式。为了解决这个问题,我们引入了CacheMind,一种对话工具,它使用检索增强生成(RAG)和大型语言模型(LLMs)来实现对缓存跟踪的语义推理。架构师现在可以提出自然语言问题,例如,“为什么与PC X相关的内存访问导致更多的置换?”并获得基于跟踪数据、可读的、与程序语义相关的答案。为了评估CacheMind,我们提出了CacheMindBench,这是第一个经过验证的基准测试集,用于基于LLM的缓存替换问题推理。使用SIEVE检索器,CacheMind在75个未见过的跟踪数据问题上实现了66.67%的准确率,在25个未见过的策略特定推理任务上实现了84.80%的准确率;使用RANGER,它在相同评估中实现了89.33%和64.80%的准确率。此外,使用RANGER,CacheMind在CacheMindBench的跟踪数据层中对6个类别中的4个实现了100%的准确率。与LlamaIndex(10%检索成功率)相比,SIEVE实现了60%的准确率,RANGER实现了90%的准确率,证明了现有的检索增强生成(RAGs)在精确、基于跟踪数据的微架构推理方面是不足的。我们通过使用CacheMind提供了四个具体的可操作见解,其中绕过使用案例将缓存命中率提高了7.66%,速度提升了2.04%;软件修复使用案例实现了76%的速度提升;Mockingjay替换策略使用案例实现了0.7%的速度提升;展示了CacheMind在需要自然语言接口的非平凡查询上的实用性。
英文摘要:
Cache replacement remains a challenging problem in CPU microarchitecture, often addressed using hand-crafted heuristics, limiting cache performance. Cache data analysis requires parsing millions of trace entries with manual filtering, making the process slow and non-interactive. To address this, we introduce CacheMind, a conversational tool that uses Retrieval-Augmented Generation (RAG) and Large Language Models (LLMs) to enable semantic reasoning over cache traces. Architects can now ask natural language questions like, "Why is the memory access associated with PC X causing more evictions?", and receive trace-grounded, human-readable answers linked to program semantics for the first time. To evaluate CacheMind, we present CacheMindBench, the first verified benchmark suite for LLM-based reasoning for the cache replacement problem. Using the SIEVE retriever, CacheMind achieves 66.67% on 75 unseen trace-grounded questions and 84.80% on 25 unseen policy-specific reasoning tasks; with RANGER, it achieves 89.33% and 64.80% on the same evaluations. Additionally, with RANGER, CacheMind achieves 100% accuracy on 4 out of 6 categories in the trace-grounded tier of CacheMindBench. Compared to LlamaIndex (10% retrieval success), SIEVE achieves 60% and RANGER achieves 90%, demonstrating that existing Retrieval-Augmented Generation (RAGs) are insufficient for precise, trace-grounded microarchitectural reasoning. We provided four concrete actionable insights derived using CacheMind, wherein bypassing use case improved cache hit rate by 7.66% and speedup by 2.04%, software fix use case gives speedup of 76%, and Mockingjay replacement policy use case gives speedup of 0.7%; showing the utility of CacheMind on non-trivial queries that require a natural-language interface.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。