RepoOMP:基于仓库感知的热点OpenMP并行化方法——通过依赖感知的上下文缩减
RepoOMP: Repository-Aware Hotspot OpenMP Parallelization via Dependency-Aware Context Reduction
浏览论文内容
中文总结 AI 辅助
RepoOMP是一种混合框架,通过构建MAP和STC,在951个热点上实现平均加速比8.23×至8.96×,降低智能体令牌成本,为仓库热点并行化提供证据引导的工作流。
中文摘要 AI 辅助
成熟仓库中热点的OpenMP并行化仍存在困难,因为循环安全性和优化收益往往依赖于非局部证据。基于规则的工具在无法局部证明合法性时会并行化不足,而基于智能体的方法在检索缺失关键依赖或包含无关代码时会变得不稳定。本文提出RepoOMP,一种在生成前恢复并行化相关证据的混合框架。RepoOMP构建多粒度属性性能图(MAP),在确定性规则与大语言模型(LLM)智能体之间路由热点,并构建结构化转换上下文(STC),该上下文在避免模型被无关仓库文本淹没的同时暴露依赖事实。我们在来自NPB、BOTS、FFmpeg、NCNN和GROMACS的951个经分析的热点上评估RepoOMP。在编译、特定工作负载检查和正加速比的条件下,372个热点被接受,其中包括330个真实仓库热点。RepoOMP在NPB上实现平均加速比8.23×,在BOTS上实现平均加速比8.96×。在匹配骨干和鲁棒性分析使用的9个详细真实内核上,RepoOMP的跨骨干均值为5.25×,相较于非结构化的Claude Code基线,加速比提升18%至28%,智能体侧令牌成本降低47%至68%。在330个被接受的真实热点中,中位加速比为2.25×。总体而言,RepoOMP为仓库场景中的热点并行化提供了证据引导的工作流,其开源仓库可在指定URL获取。
英文摘要
OpenMP parallelization of hotspots in mature repositories remains difficult because loop safety and optimization payoff often depend on non-local evidence. Rule-based tools under-parallelize when legality is not locally provable, while agent-based approaches become unstable when retrieval misses decisive dependencies or includes irrelevant code. We present RepoOMP, a hybrid framework that recovers parallelization-relevant evidence before generation. RepoOMP builds a Multi-granularity Attributes Performance graph (MAP), routes hotspots between deterministic rules and an LLM agent, and constructs a Structured Transformation Context (STC) that exposes dependency facts without flooding the model with unrelated repository text. We evaluate RepoOMP on 951 profiled hotspots from NPB, BOTS, FFmpeg, NCNN, and GROMACS. Under compilation, workload-specific checks, and positive speedup, 372 hotspots are accepted, including 330 real-world repository hotspots. RepoOMP achieves average speedups of $8.23\times$ on NPB and $8.96\times$ on BOTS. For the nine detailed real-world kernels used in matched-backbone and robustness analyses, RepoOMP reaches a cross-backbone mean of $5.25\times$, improves speedup by 18--28\%, and reduces agent-side token cost by 47--68\% relative to the unstructured Claude Code baseline. Across 330 accepted real-world hotspots, median speedup is $2.25\times$. Overall, RepoOMP provides an evidence-guided workflow for hotspot parallelization in repository settings. The open-source repository is available at https://github.com/Qlalq/RepoOMP_Simplified.