计算机科学 > 机器学习
[提交于 2026年11月30日]
标题:Understanding the Impact of Tolerance Threshold in Automated GPU Kernel Optimization
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:GPU kernel optimization is increasingly driven by standardized benchmarks and autonomous kernel agents. To assess correctness, these benchmarks and agents commonly use differential testing, accepting an optimized kernel when its outputs remain within a predefined tolerance threshold of the reference outputs. However, how discrepancies accepted by these tests affect model behavior during inference remains poorly understood. In this paper, we investigate this question through real kernel replacements and controlled perturbations. We first integrate 1,160 published optimized kernel implementations from CUDA-L1 and the KernelBench leaderboard into 13 real-world models across three numerical precisions. Across 2,739 replacement evaluations, 55.28% produce at least one output change. Although accuracy changes are usually small, 11 evaluations incur accuracy drops greater than 50%. In the most severe case, Gemma-4-E4B's accuracy on MMLU falls from 67.0% to 5.5%. We then conduct 6,928 controlled perturbation evaluations to examine how numerical discrepancies affect model behavior. The effects depend on numerical precision, operator, and dataset. For Gemma-4-12B on MMLU in FP16, perturbations of the same magnitude change outputs for 73.6% of model inputs when applied to post_attention_rmsnorm, but cause no output changes when applied to lm_head. Our findings show that passing kernel-level tests does not prevent substantial and varied changes in model behavior. We hope our research findings can inspire the community to further explore correctness criteria in future kernel benchmarks and optimization agents.
提交历史
来自:Zirui Wang[v1] 2026年11月30日 星期一 07:33:11 UTC (872 KB)