コンパイル済みモデルを検証しながらGPUカーネルを最適化
KernelOPT: Dispatch-Aware Agentic Search for GPU Kernel Optimization
この論文をやさしく読む
ひとことで言うと
GPUカーネルの一部をLLMで改良し、モデル全体で正しさを確認してから採用する最適化システム。
何に役立つ?
コンパイラーが作った深層学習モデルの速度を改善する際、既存のライブラリ呼び出しやモデル全体の正しさを守る方法として参考になる。
この研究の面白いところ
四段階の検証を通過しない候補は捨て、元のコンパイラー出力を残す設計で、性能だけでなく正しさを判定に組み込んでいる。
どこまで分かった?
高速化の倍率はKernelBenchの250課題での結果。レベルが上がるほど平均改善は小さく、すべての課題で高速化したわけではない。
v1のアブストラクトに基づくAI解説。日本語訳とは別に、用途の解釈を含みます。
アブストラクトの日本語訳
深層学習の推論・訓練性能は、GPUカーネルの効率に大きく依存する。PyTorch Inductorなどの現代的なコンパイラーは高水準のモデルコードからGPUカーネルを自動生成するが、専門家が書いた実装に大きく劣ることが多い。最近のLLM支援型の最適化器は単独のカーネルでその差を縮められるものの、コンパイル済みモデルをブラックボックスとして扱い、コンパイラーが決めた構造を尊重せずに単独のカーネルを最適化しがちで、モデル全体を通した検証もしない。 本研究は、コンパイル済みモデルを構造を持つ成果物として扱う、複数エージェントからなるKernelOPTを提案する。cuBLASとcuDNNなどの提供元ライブラリへの呼び出しは保持し、性能測定に基づいて動く五つのLLMエージェントで、生成されたTritonの部分カーネルだけを対象とする。最適化中の候補は、静的検証、複数の乱数種での正しさ、モデル全体でのfloat64へのフォールバックを使った検証、性能の審査という四段階で選別する。つなぎ直したモデルも最後まで検証する。四段階すべてに通る候補がなければ、コンパイラーによる元の実装を残す。PyTorchのnn.Module、単独のTritonカーネル、Helionカーネルを入力として受け付ける。 KernelBenchの250課題で評価した結果、全課題にわたるtorch.compileに対する幾何平均の高速化は、レベル1で1.40倍(100課題中51課題)、レベル2で1.15倍(100課題中31課題)、レベル3で1.07倍(50課題中12課題)だった。
v1の要旨から自動生成。本文の精読・人による確認は未実施。
- 初稿
- 2026-09-24(UTC)
- 最新改訂
- 2026-09-24 · v1
- 査読・掲載
- 査読状況未確認
更新履歴
- v1 2026-09-24 この版を読む
取得できた版を表示。版の更新は査読済みを意味しません。過去版の本文差分は未解析です。
原文の要旨
Deep learning inference and training performance depends critically on GPU kernel efficiency. Modern compilers such as PyTorch Inductor automatically generate GPU kernels from high-level model code, but frequently underperform expert-written implementations by wide margins. Recent LLM-assisted kernel optimizers can close this gap for standalone kernels, yet treat compiled models as black boxes, generally optimizing individual standalone kernels without respecting the compiler's structural decisions or verifying the model end-to-end. We present KernelOPT, a multi-agent system that treats compiled models as structured artifacts. It preserves vendor library calls (cuBLAS, cuDNN) and exclusively targets generated Triton sub-kernels using five profiling-guided LLM agents. A four-gate verification cascade of static validation, multi-seed correctness, model-level float64-fallback verification, and performance gating filters candidates during optimization and verifies the re-stitched model end-to-end. If no candidate passes all four gates, the system preserves the compiler baseline. The system accepts PyTorch nn.Modules, standalone Triton kernels, and Helion kernels. Evaluated on 250 KernelBench problems, KernelOPT achieves geometric mean speedups over \texttt{torch.compile} of 1.40$\times$ (Level 1: 51/100), 1.15$\times$ (Level 2: 31/100), and 1.07$\times$ (Level 3: 12/50) across all problems.
arXiv ID: 2609.30059 / 要約の誤りについて