GPU実行バイナリに直接挿入する高精度トレース
Xtrace: High-Fidelity GPU Intra-Kernel Tracing via Binary-Level Instruction Splicing
この論文をやさしく読む
ひとことで言うと
GPUのコンパイル済み命令へ計測命令を直接挿入し、実際に動くカーネルに近い状態を低負荷で追跡する方法。
何に役立つ?
LLM向けGPUカーネルのボトルネック分析と性能改善の反復に役立つ。
この研究の面白いところ
元の命令の保持率と実行負荷を従来ツールと比較し、トレースを使うエージェントの改善作業も評価した。
どこまで分かった?
保持率94~98%、負荷0.9~2.8%は要旨にあるH100、B300、MI300Xでの評価値である。他の作業負荷でも同じとは限らない。
v1のアブストラクトに基づくAI解説。日本語訳とは別に、用途の解釈を含みます。
アブストラクトの日本語訳
現代のGPUカーネルは一つのカーネルに多くの処理をまとめるため、内部の実行状況を追跡する手法が性能分析の中心になっている。トレースでは実行時の状態を記録するための計測命令を挿入し、その忠実度が性能改善の効率を左右する。しかし従来のツールはコンパイル前に計測命令を挿入するため、コンパイラーの最適化に干渉し、GPUが実際に実行するものとは異なるバイナリを追跡する。また、実行時の負荷も大きい。Xtraceは、コンパイル時の干渉をほぼなくし、実行時の負荷を抑えたGPUカーネル追跡システムとして提案される。 Xtraceはコンパイル済みのカーネルバイナリに直接計測命令を挿入する。挿入位置で値が既に不要になったレジスターだけを再利用し、コンパイラーのハザード表で全ての依存関係上の危険を解決する。さらに命令順、レジスター割り当て、制御ビットを調整して、追加命令による実行時負荷を最小化する。NVIDIAとAMDの計19種類のGPUアーキテクチャに対応し、https://g-watch.github.io で公開されている。 大規模言語モデルに使われる主要な実運用カーネルを対象に、NVIDIAのNeutrinoとIKETという従来の追跡器と比較した。H100、B300、MI300Xでは、Xtraceは元のカーネル命令の94~98%を保ち、従来ツールは8~48%だった。追加負荷はXtraceで0.9~2.8%、従来ツールで3.8~75.6%だった。Xtraceの情報を使うコーディングエージェントは、既存のトレースを使う場合より反復回数が3.9分の1で同じFlashAttention-3の性能に達した。バイナリへの直接計測により、より高速な非公開のcuDNNカーネルも追跡でき、その情報を使うエージェントは、公開されているFlashAttention-4のスループットを5.2~13.3%向上させた。
v1の要旨から自動生成。本文の精読・人による確認は未実施。
- 初稿
- 2026-09-23(UTC)
- 最新改訂
- 2026-09-23 · v1
- 査読・掲載
- 査読状況未確認
更新履歴
- v1 2026-09-23 この版を読む
取得できた版を表示。版の更新は査読済みを意味しません。過去版の本文差分は未解析です。
原文の要旨
Modern GPU kernels fuse increasingly more work into a single kernel, and intra-kernel tracing has become the mainstream method to profile them. Tracing inserts probes into the kernel to record its runtime states, and the fidelity of the trace determines the efficiency of performance optimization. Unfortunately, existing tools insert probes before compilation. These tools interfere with the compiler's optimizations, so they trace a different binary from the one the GPU executes. They also add significant runtime overhead. Xtrace is the first GPU kernel tracing system with near-zero compile-time interference and minimized runtime overhead. Xtrace inserts probes directly into the compiled kernel binary. It reuses only the registers that hold dead values at the insertion address and resolves all hazards with the compiler's hazard tables. It further schedules the instruction order, register allocation, and control bits to minimize the runtime overhead the probe introduces. Xtrace supports 19 NVIDIA and AMD GPU architectures, and is publicly available for use at https://g-watch.github.io. We evaluate Xtrace on major production large language model (LLM) kernels against the state-of-the-art tracers Neutrino and IKET from NVIDIA. On H100, B300, and MI300X GPUs, Xtrace preserves 94-98% of the instructions of the kernel, while existing tools preserve only 8-48%. Xtrace adds only 0.9-2.8% overhead, while existing tools add 3.8-75.6%. Xtrace guides a coding agent to reach the same FlashAttention-3 performance with 3.9x fewer iterations than existing traces do. Thanks to our binary-level instrumentation, Xtrace also traces the faster closed-source cuDNN kernel, which guides the agent to lift the open-source FlashAttention-4 by 5.2-13.3% in throughput.
著者のコメント
13 pages of main text plus an appendix (24 pages in total), 16 figures, 5 tables. Xtrace is publicly available at https://g-watch.github.io
arXiv ID: 2609.28769 / 要約の誤りについて