# GPU観測性 ## 定義 GPU観測性(GPU observability)とは、GPU 上で実行されるカーネル・メモリ転送・演算子・スケジューリングといった挙動を、性能ボトルネックや異常箇所の特定に足る粒度で外部から可視化する取り組み。ベンダー提供のプロファイラ(NVIDIA の CUPTI・NVBit・Nsight)が高い詳細度を持つ一方で、オーバーヘッドが大きい・稼働中カーネルを中断する侵襲的計装を要する・ベンダーロックインを伴う、という共通の課題を持つ。([[@2025__HCDS__eGPU - Extending eBPF Programmability and Observability to GPUs]], [[@2025__eBPF__eInfer - Unlocking Fine-Grained Tracing for Distributed LLM Inference with eBPF]]) これを低オーバーヘッド・非侵襲・ベンダー非依存で代替しようとする系統が近年立ち上がっている。 ## 横断的知見 - **計装の「挿入時点」で 3 系統に分かれ、オーバーヘッドと粒度がトレードオフになる**: (a)**コンパイル時計装** — [[@2024__TOPC__Low-Overhead Trace Collection and Profiling on GPU Compute Kernels]] は LLVM パスで制御フローを静的に解いてバッファを事前確保し、Rodinia で全体 1.60×(中央値 1.26×)と類似研究比で 1 桁の低オーバーヘッドを得る。(b)**実行時 PTX 注入** — [[@2025__HCDS__eGPU - Extending eBPF Programmability and Observability to GPUs]] は eBPF バイトコードを PTX に JIT して稼働中カーネルへ中断なしに注入する。(c)**ホスト側 eBPF フック** — [[@2025__eBPF__eInfer - Unlocking Fine-Grained Tracing for Distributed LLM Inference with eBPF]]・[[@2026__arXiv__ProfInfer - An eBPF-based Fine-Grained LLM Inference Profiler]] はランタイム関数(uprobe)や GPU ドライバ呼び出し(ioctl)を傍受し、GPU 内部には踏み込まずホスト側からカーネル実行を再構成する。「先に制御フローを解く(コンパイル時)/稼働中に書き換える(PTX)/外から覗く(ホスト eBPF)」の差がそのままコストと観測対象の差になる。(Source: [[@2024__TOPC__Low-Overhead Trace Collection and Profiling on GPU Compute Kernels]], [[@2025__HCDS__eGPU - Extending eBPF Programmability and Observability to GPUs]], [[@2025__eBPF__eInfer - Unlocking Fine-Grained Tracing for Distributed LLM Inference with eBPF]]) - **ベンダー専用ツール回避が共通の動機**: CUPTI・NVBit・Nsight は eInfer・eGPU・TOPC のいずれもが「高オーバーヘッド/侵襲的/ベンダーロックイン」として明示的な比較対象に置く。eInfer はベンダー非依存で CUPTI に近い精度を、eGPU は NVBit ベースの gpumemtrace より低オーバーヘッドを主張する。(Source: [[@2025__eBPF__eInfer - Unlocking Fine-Grained Tracing for Distributed LLM Inference with eBPF]], [[@2025__HCDS__eGPU - Extending eBPF Programmability and Observability to GPUs]]) - **ホスト側 eBPF は GPU 内部の死角が残る**: eInfer・eGPU はともに、SM 利用率などの GPU マイクロアーキテクチャ内部情報は依然ハードウェアカウンタ([[ハードウェアカウンタ]])に依存すると認める。eBPF はホスト側(ドライバ・スケジューリング・メモリ操作)の傍受に強いが、デバイス内部の可視性はカウンタや PTX 注入で別途補う必要がある。(Source: [[@2025__eBPF__eInfer - Unlocking Fine-Grained Tracing for Distributed LLM Inference with eBPF]], [[@2025__HCDS__eGPU - Extending eBPF Programmability and Observability to GPUs]]) - **低オーバーヘッドが各系統で実証され始めた**: eInfer <4%、ProfInfer はランタイム速度低下 5% 未満(libbpf 最小 1.19%、token/graph レベルのみなら 0.1%)、TOPC は実行時間 1.5〜1.6×。低オーバーヘッドは「常時プロファイリングに近い本番運用」を可能にする点で各論文が価値とみなす。(Source: [[@2025__eBPF__eInfer - Unlocking Fine-Grained Tracing for Distributed LLM Inference with eBPF]], [[@2026__arXiv__ProfInfer - An eBPF-based Fine-Grained LLM Inference Profiler]], [[@2024__TOPC__Low-Overhead Trace Collection and Profiling on GPU Compute Kernels]]) - **観測性は「正しさ検証」の基盤にもなる**: [[@2024__arXiv__Microsecond-scale Dynamic Validation of Idempotency for GPU Kernels]](PICKER)は GPU 動的計装(NVBit 系)で全メモリアクセスを追跡し、カーネルの[[べき等性]]検証に用いる。GPU 観測性は性能診断だけでなく耐障害・スケジューリングの正しさ判定にも転用される。(Source: [[@2024__arXiv__Microsecond-scale Dynamic Validation of Idempotency for GPU Kernels]], [[@2025__HCDS__eGPU - Extending eBPF Programmability and Observability to GPUs]]) - **全スタックトレースの計装方式で侵入度が分かれる**: [[@2024__NSDI__MegaScale - Scaling Large Language Model Training to More Than 10,000 GPUs]] はバックエンド(FSDP)へパッチを当てる侵入方式、[[@2025__arXiv__XPUTimer - Anomaly Diagnostics for Divergent LLM Training in GPU Clusters of Thousand-Plus Scale]] は CPython PyEval_SetProfile + LD_PRELOAD で非侵入・プラグアンドプレイを実現し全スタック性とバックエンド拡張性を両立する。(Source: [[@2025__arXiv__XPUTimer - Anomaly Diagnostics for Divergent LLM Training in GPU Clusters of Thousand-Plus Scale]], [[@2024__NSDI__MegaScale - Scaling Large Language Model Training to More Than 10,000 GPUs]]) ## 未解決の問い - ホスト側傍受(eBPF)だけで GPU 内部の可視性(SM 占有・ワープ実行・キャッシュ挙動)をどこまで補えるか。PTX 注入(eGPU)とハードウェアカウンタ(PMC)の併用が現実解か。 - コンパイル時計装(TOPC)と実行時計装(eGPU/eInfer)の最適な使い分けは。決定的実行を要する正しさ検証は前者、動的・本番常時観測は後者、という分業が成り立つか。 - エッジ/オンデバイス(ProfInfer の Orange Pi・Rubik Pi)とサーバ/分散(eInfer・NCCLX)で得た観測知見は相互に外挿できるか。 - 本 vault の machine-level 箇所特定([[Pulse]]・[[Minder]])やアプリ層 AIOps と、GPU/カーネル/デバイス層の観測はどう統合されるか([[eBPF]] の問いと共通)。 - 選択計装の「重要オペレータのみ」前提は、新規アルゴリズムが minority kernel を増やしたときどこまで死角を残すか。([[@2025__arXiv__XPUTimer - Anomaly Diagnostics for Divergent LLM Training in GPU Clusters of Thousand-Plus Scale]]) ## 関連 - ソース: [[@2025__eBPF__eInfer - Unlocking Fine-Grained Tracing for Distributed LLM Inference with eBPF]] / [[@2026__arXiv__ProfInfer - An eBPF-based Fine-Grained LLM Inference Profiler]] / [[@2025__HCDS__eGPU - Extending eBPF Programmability and Observability to GPUs]] / [[@2024__TOPC__Low-Overhead Trace Collection and Profiling on GPU Compute Kernels]] / [[@2024__arXiv__Microsecond-scale Dynamic Validation of Idempotency for GPU Kernels]] / [[@2025__arXiv__XPUTimer - Anomaly Diagnostics for Divergent LLM Training in GPU Clusters of Thousand-Plus Scale]] / [[@2024__NSDI__MegaScale - Scaling Large Language Model Training to More Than 10,000 GPUs]] - 概念: [[eBPF]] / [[動的インストルメンテーション]] / [[ハードウェアカウンタ]] / [[テレメトリ]] / [[LLM推論]] / [[GPUクラスタ運用]] - エンティティ: [[NVBit]] / [[CUPTI]] / [[PTX]] / [[bpftime]] / [[hip-analyzer]] / [[eGPU]] - 関連 MOC: [[AI Infra Telemetry - MOC]] ## 出典 - [[@2025__HCDS__eGPU - Extending eBPF Programmability and Observability to GPUs]](実行時 PTX 注入・NVBit/CUPTI 比較) - [[@2025__eBPF__eInfer - Unlocking Fine-Grained Tracing for Distributed LLM Inference with eBPF]](ホスト側 eBPF 傍受・ベンダー非依存) - [[@2026__arXiv__ProfInfer - An eBPF-based Fine-Grained LLM Inference Profiler]](オンデバイス・5% 未満オーバーヘッド) - [[@2024__TOPC__Low-Overhead Trace Collection and Profiling on GPU Compute Kernels]](コンパイル時計装・1 桁削減) - [[@2024__arXiv__Microsecond-scale Dynamic Validation of Idempotency for GPU Kernels]](観測による正しさ検証) - [[@2025__arXiv__XPUTimer - Anomaly Diagnostics for Divergent LLM Training in GPU Clusters of Thousand-Plus Scale]](CPython PyEval_SetProfile + LD_PRELOAD による非侵入・全スタック計装) - [[@2024__NSDI__MegaScale - Scaling Large Language Model Training to More Than 10,000 GPUs]](バックエンド計装による全スタックトレース)