# AI Systems Performance Engineering
## 概要
Chris Fregly による、GPUクラスタ上でのAIモデル学習・推論の性能エンジニアリングを網羅する実務書。ハードウェア(GPU/ネットワーク/ストレージ)からCUDAカーネル最適化、PyTorch/コンパイラ、分散学習、推論サービングのスケーリングまでを一気通貫で扱う。
## 書誌情報
- 出版社: O'Reilly Media
- 出版日: 2025-11-12 頃
- 著者: Chris Fregly
- 構成: 全20章 + Appendix(チェックリスト)
- ISBN: 9798341627789(紙)/ 9798341627772(電子)
- URL: https://learning.oreilly.com/library/view/ai-systems-performance/9798341627772/
## 構成と主要テーマ
### Part I: ハードウェア基盤(第1〜2章)
Mechanical sympathy(ハードウェア・ソフトウェア協調設計)を書籍全体の中心テーマとして導入し、Blackwell世代のGPU・Superchipアーキテクチャを解説する。
→ [[@2025__OReilly__AI Systems Performance Engineering - Chapter 1 Introduction and AI System Overview]] — mechanical sympathyを軸に、DeepSeekのH800制約下でのDualPipe最適化事例とgoodput指標からAIシステム性能エンジニアの役割を導入する
→ [[@2025__OReilly__AI Systems Performance Engineering - Chapter 2 AI System Hardware Overview]] — Grace CPU+Blackwell GPU(GB200 NVL72)のSuperchip・NVLink/NVSwitch・液冷ラック構成というハードウェア全体像を解説する
### Part II: OS・ストレージ・ネットワーキング(第3〜5章)
GPUクラスタを支えるシステムレベルの基盤層(OS/コンテナ/オーケストレーション、ストレージI/O、分散ネットワーキング)を扱う。
→ [[@2025__OReilly__AI Systems Performance Engineering - Chapter 3 OS, Docker, and Kubernetes Tuning for GPU-Based Environments]] — NUMA・hugepages・MPS/MIG・Kubernetes/SLURMオーケストレーションのシステムレベルチューニングを扱う
→ [[@2025__OReilly__AI Systems Performance Engineering - Chapter 4 Tuning Distributed Networking Communication]] — RDMA・NCCL・InfiniBand・Magnum IOによる分散ネットワーキング通信のチューニングを扱う
→ [[@2025__OReilly__AI Systems Performance Engineering - Chapter 5 GPU-Based Storage IO Optimizations]] — GPUDirect Storage・DeepSeek 3FS・PyTorch DataLoader・NVIDIA DALIによるストレージI/O最適化を扱う
### Part III: CUDAカーネル最適化(第6〜12章)
Rooflineモデルに基づく演算強度・占有率の理論から、warp specialization・CUDA Graphs・NVSHMEMによるマルチGPUオーケストレーションまで、カーネルレベルの最適化を段階的に積み上げる。
→ [[@2025__OReilly__AI Systems Performance Engineering - Chapter 6 GPU Architecture, CUDA Programming, and Maximizing Occupancy]] — GPUアーキテクチャ・CUDAプログラミングの基礎とRooflineモデルによる占有率最大化を扱う
→ [[@2025__OReilly__AI Systems Performance Engineering - Chapter 7 Profiling and Tuning GPU Memory Access Patterns]] — メモリコアレッシング・共有メモリバンクコンフリクト回避・TMAによるメモリアクセスパターンのプロファイリングとチューニングを扱う
→ [[@2025__OReilly__AI Systems Performance Engineering - Chapter 8 Occupancy Tuning, Warp Efficiency, and Instruction-Level Parallelism]] — Nsight Systems/Computeによる診断からoccupancyチューニング・warp divergence緩和・命令レベル並列性引き出しまでを扱う
→ [[@2025__OReilly__AI Systems Performance Engineering - Chapter 9 Increasing CUDA Kernel Efficiency and Arithmetic Intensity]] — マルチレベルタイリング・CUTLASS・カーネルフュージョン・低精度Tensor Core活用による演算強度の引き上げを扱う
→ [[@2025__OReilly__AI Systems Performance Engineering - Chapter 10 Intra-Kernel Pipelining, Warp Specialization, and Cooperative Thread Block Clusters]] — warp specialization・persistent kernel・thread block cluster/DSMEMによるカーネル内パイプライニングを扱う
→ [[@2025__OReilly__AI Systems Performance Engineering - Chapter 11 Inter-Kernel Pipelining, Synchronization, and CUDA Stream-Ordered Memory Allocations]] — CUDAストリームによるカーネル間オーバーラップとstream-ordered memory allocatorによる非同期実行設計を扱う
→ [[@2025__OReilly__AI Systems Performance Engineering - Chapter 12 Dynamic Scheduling, CUDA Graphs, and Device-Initiated Kernel Orchestration]] — アトミックワークキュー・CUDA Graphs・Dynamic Parallelism・NVSHMEMによるGPUオーケストレーションを扱う
### Part IV: PyTorchとコンパイラ(第13〜14章)
PyTorchのプロファイリング・スケーリングから、torch.compile/TorchDynamo/TorchInductor・OpenAI Triton・XLAバックエンドのコンパイラ最適化までを扱う。
→ [[@2025__OReilly__AI Systems Performance Engineering - Chapter 13 Profiling, Tuning, and Scaling PyTorch]] — PyTorch Profiler・DDP/FSDPによるプロファイリング・チューニング・スケーリングを扱う
→ [[@2025__OReilly__AI Systems Performance Engineering - Chapter 14 PyTorch Compiler, OpenAI Triton, and XLA Backends]] — TorchDynamo→AOT Autograd→TorchInductorのコンパイルパイプライン、OpenAI Tritonカスタムカーネル、XLAバックエンドを扱う
### Part V: 分散推論サービング(第15〜20章)
マルチノード推論の並列化・ルーティングから、Prefill-Decode分離・KVキャッシュチューニング・AI支援最適化・超大規模GPUクラスタへのスケーリングまでを扱う。
→ [[@2025__OReilly__AI Systems Performance Engineering - Chapter 15 Multinode Inference, Parallelism, Decoding, and Routing Optimizations]] — テンソル並列・MoEルーティング・Speculative Decoding・Prefill-Decode分離の配置指針(NIXL・llm-d)を扱う
→ [[@2025__OReilly__AI Systems Performance Engineering - Chapter 16 Profiling, Debugging, and Tuning Inference at Scale]] — vLLM/SGLang等の推論エンジンのプロファイリング・デバッグ・大規模チューニングを扱う
→ [[@2025__OReilly__AI Systems Performance Engineering - Chapter 17 Scaling Disaggregated Prefill and Decode for Inference]] — Disaggregated Prefill/Decodeのスケーリング、NIXLのパス選択、llm-dの動的プール再配分を扱う
→ [[@2025__OReilly__AI Systems Performance Engineering - Chapter 18 Advanced Prefill-Decode and KV Cache Tuning]] — FlashMLA/ThunderMLA・分離型KVキャッシュプール・POD-Attentionによる高度なKVキャッシュチューニングを扱う
→ [[@2025__OReilly__AI Systems Performance Engineering - Chapter 19 Dynamic and Adaptive Inference Engine Optimizations]] — SpeCacheによる投機的KVプリフェッチとGPUメモリ使用率に応じたリアルタイムKVキャッシュ量子化を扱う
→ [[@2025__OReilly__AI Systems Performance Engineering - Chapter 20 AI-Assisted Performance Optimizations and Scaling Toward Multimillion GPU Clusters]] — LLM駆動のGPUカーネル自動生成と超大規模GPUクラスタへのスケーリングを扱う
### Appendix
→ [[@2025__OReilly__AI Systems Performance Engineering - Appendix AI Systems Performance Checklist]] — 全20章の技法を、最適化マインドセット→ハードウェア/OS/GPUリソース→I/O/データパイプライン→プロファイリング/CUDA最適化→精度/アルゴリズム→分散通信→推論サービング→電力管理の順に175項目超のチェックリストとして再編成したもの
## 影響と位置づけ
DeepSeekのH800輸出規制下での最適化事例([[DeepSeek-V3]])を導入の起点に据え、GPUハードウェアの物理層(NVLink/NVSwitch/液冷)からCUDAカーネル・PyTorchコンパイラ・分散推論サービング(Prefill-Decode分離・KVキャッシュ・MoEルーティング)までを単一の教科書で一気通貫に扱う点が特徴である。2025年時点のBlackwell世代ハードウェアと、vLLM・SGLang・NIXL・llm-dといった最新の推論サービングスタックを実測値・ベンチマーク付きで解説しており、実務者向けのリファレンスとしての性格が強い。既存の [[@2026__技術評論社__実践的パフォーマンスエンジニアリングによるAI高速化 - Chapter 1 パフォーマンスエンジニアリング概論]] 等と並び、AI性能エンジニアリングの体系的教科書群の一つとして wiki 内に位置づけられる。
## 関連
- 実体: [[NVIDIA]] / [[NVIDIA GB200 NVL72]] / [[DeepSeek-V3]] / [[PyTorch]] / [[Kubernetes]]
- 概念: [[Rooflineモデル]] / [[GPU占有率(Occupancy)]] / [[CUDA]] / [[CUDAGraph]] / [[Prefill-Decode分離]] / [[KVキャッシュ管理]] / [[混合精度訓練]]
## 出典
- Chris Fregly, *AI Systems Performance Engineering: Optimizing Model Training and Inference Workloads with GPUs, CUDA, and PyTorch*, O'Reilly Media, 2025.