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

上帝不掷骰子:在智能体内核生成中强制执行批次不变性

God Does Not Play Dice: Enforcing Batch Invariance in Agentic Kernel Generation

STAR Lab, George Mason University(乔治梅森大学STAR实验室);National University of Singapore(新加坡国立大学)

Youwei Bao, Chengpeng Wang, Simin Chen

AI总结:

本研究针对LLM服务系统GPU内核的批次不变性缺失问题,提出插件组件\tool,结合静态分析与动态验证,将批次不变性通过率从67.6%提至91.9%,同时保留91.8%的基线加速比,为智能体内核优化增加可靠性目标。

摘要:

大型语言模型(LLM)服务系统会动态将用户请求批处理以在GPU上执行,因此同一请求在不同运行中可能与不同请求一同处理。如果GPU内核缺乏批次不变性(Batch Invariance,BI),这种变化的批次上下文会改变相同输入的数值输出,破坏可复现性。现有的内核生成智能体聚焦于正确性和效率,但忽略了批次不变性。我们在83个可应用批次的已发布工件中发现19个已确认的批次不变性违规案例。为解决这一局限,我们提出了\tool,它结合了契约引导的静态依赖分析与跨批次上下文的逐位一致性动态验证。\tool被设计为通用内核智能体的插件组件,允许复用其原始优化能力,同时添加批次不变性强制执行。我们将其集成到优化循环中作为连续的接受门,在性能基准测试前拒绝结构上有风险或动态非不变的候选,并向智能体返回反馈。在三个智能体框架上针对真实世界LLM服务任务的基线和批次感知生成实验显示,\tool将批次不变性通过率从67.6%提升至91.9%,同时保留了基线几何平均加速比的91.8%。这些结果表明,\tool可作为额外的可靠性目标,与正确性和速度一同被纳入智能体的内核优化中。

英文摘要:

Large language model (LLM) serving systems dynamically batch user requests for GPU execution, so the same request may be processed alongside different requests across runs. If the GPU kernels lack batch invariance (BI), this changing batch context can alter the numerical output for an unchanged input, undermining reproducibility. Existing kernel generation agents focus on correctness and efficiency but \emph{overlook BI}. We find 19 confirmed BI violations among 83 batch-applicable released artifacts. To address this limitation, we propose \tool, which combines contract-guided static dependency analysis with dynamic validation of bitwise consistency across batch contexts. \tool is designed as a plug-in component for general kernel agents, allowing their original optimization capabilities to be reused while adding BI enforcement. We integrate it as successive acceptance gates in the optimization loop, rejecting structurally risky or dynamically non-invariant candidates before performance benchmarking and returning feedback to the agent. Experiments across three agent frameworks under baseline and BI-aware generation on real world LLM serving tasks show that \tool improves the BI pass rate from 67.6\% to 91.9\% while retaining 91.8\% of the baseline geometric mean speedup. These results demonstrate that \tool can be incorporated into kernel optimization by agents as an additional reliability objective alongside correctness and speed.

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

↑