Driving · 2026-12-01
Understanding the Impact of Tolerance Threshold in Automated GPU Kernel Optimization
Zirui Wang, Yunbo Ni, Jinjie Liu, Chijin Zhou, Shaohua Li
AI-assisted summary based on the paper. Consult the linked source for methods and limitations. Benchmark numbers appear after editor verification.
TL;DR
The authors study how kernel-level differential testing with tolerance thresholds affects model inference. They integrate 1,160 optimized CUDA kernels into 13 models and find that 55.28% of kernel replacements cause at least one output change and 11 evaluations drop accuracy by more than 50% (Gemma-4-E4B MMLU: 67.0% to 5.5%). Controlled perturbations show that discrepancies can alter model behavior differently by precision, operator, and location.
Why it matters
Kernel benchmarks often accept optimized GPU kernels when their outputs are within a predefined tolerance of reference outputs. The authors report that passing these kernel-level tests does not prevent substantial and varied changes in model behavior during inference, including large accuracy drops and negative flips.
Method
- Real kernel replacements: integrate 1,160 optimized kernels from CUDA-L1 and the KernelBench leaderboard into 13 open-source models across FP32/FP16/BF16, keeping only kernels that pass the kernel-level test and run inference without fallback or runtime failures.
- Replacement evaluation metrics: measure output change, negative flip (reference correct becomes incorrect), and accuracy change using exact-match correctness for each task.
- Controlled perturbations: inject output perturbations into reference kernels over 6,928 evaluations to test how numerical discrepancies affect model behavior by precision, operator, and dataset.
Abstract (from arXiv)
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.
Related papers
- FlashRT-PAI: Fast Kernels Are Not Fast Pipelines for Physical AI
- Quantization for Action, Execution for Deployment: Joint Precision and Execution Selection for World Action Models
- When Does Test-Time Search Help World Action Models? An Empirical Audit of Candidate Selection and Simulator Integrity
- STEPQuant: When and Where Errors Matter in Delta-Rule Recurrent State Quantization
- Mitigating SM-Level Load Imbalance in 3D Gaussian Splatting on GPUs
Publication record
Bibliographic evidence describes where and when a record appeared. It does not validate scientific claims.
First announced by arXiv: 2026-12-01 · Indexed by Pub-AI: 2026-12-01 UTC
Understanding the Impact of Tolerance Threshold in Automated GPU Kernel Optimization
First announced by arXiv: 2026-12-01 · Original record ↗
- arxiv
- 2611.40607
Explicit source versions (1)
- v1 · Date not supplied
- Preprint available
Source date: 2026-12-01 · First detected: 2026-12-01 UTC · Historical baseline
Source evidence (1)
- Official evidence ↗ · RSS guid=oai:arXiv.org:2611.40607v1; arxiv:announce_type=new; item pubDate (official metadata)
Abstract · arxiv
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.
