Skip to Content
AIシステム性能エンジニアリング (Japanese Edition)
book

AIシステム性能エンジニアリング (Japanese Edition)

by Chris Fregly
November 2025
Intermediate to advanced
1060 pages
18h 47m
Japanese
O'Reilly Media, Inc.
Content preview from AIシステム性能エンジニアリング (Japanese Edition)

章8 占有率 チューニング、ワープ効率性、命令レベル並列性

この作品はAIを使って翻訳されている。ご意見、ご感想をお待ちしている:translation-feedback@oreilly.com

現代のGPU加速ワークロードはハードウェアの限界に挑んでいる。BlackwellのようなマルチダイGPUは、複数のレチクル制限ダイを10TB/sのNV-HBIリンクで接続し、L2キャッシュを126MBに拡大している。こうしたハードウェア設計の選択は、メモリ対演算のトレードオフと占有率の最適点を大きく変える。これによりプロファイリングと最適化はこれまで以上に重要となる。メモリ最適化の基礎を踏まえ、現代GPUの全性能を最大限に活用するための高度な遅延隠蔽テクニックとスループット向上手法に移行する。

パフォーマンスのボトルネックを特定し、体系的な最適化戦略を適用して一つずつ解消することに焦点を当てる。本章の主要テーマは、占有率の調整、ワープ効率の最適化、命令レベル並列性の向上である。

本章の終わりまでに、GPUの低利用率の根本原因を特定し適切な最適化手法の組み合わせを適用できるようになる。また、後続の章で扱うCUDA GraphsやCUDA Streamsといったプリミティブを用いたカーネル融合やパイプライン処理といった高度なテクニックへの準備も整える。

CUDA C++やPyTorchといったAIフレームワークといった高レベル言語に焦点を当てつつも、プロファイリングとチューニングの原則はスタックの全レベル、ハードウェアレベルにまで適用される。したがって、高レベルな抽象化では完全な解決が困難なボトルネックを診断するには、低レベルなハードウェア性能の理解が依然として重要である。

GPUボトルネックのプロファイリングと診断

最適化を行う前に、まずコード内のボトルネックを特定し、どのハードウェアまたはソフトウェアリソースがパフォーマンスを制限しているかを判断しなければならない。現代のNVIDIA GPUは複雑であり、速度低下はメモリ帯域幅、メモリ遅延、命令スループット、同期オーバーヘッド、並列性の不足、ホスト-デバイス間転送遅延など、多くの要因から生じうる。

NVIDIAのプロファイリング環境には、Nsight Systems(コマンドラインインタフェースnsys )とNsight Compute(コマンドラインインタフェースncu )が含まれる。Nsight SystemsはCPUスレッド、GPUカーネル、メモリ転送のシステムレベルタイムラインを捕捉する。PythonバックトレースやPythonサンプリングの捕捉も可能だ。

PyTorchプロファイラや各種可視化ツールと組み合わせることで、Nsight SystemsとNsight Computeはカーネルの性能ボトルネックの診断、ルーフラインプロットの分析、反復的な最適化作業の効果測定を支援できる。

Nsight Systems タイムラインビュー

Nsight Systemsのタイムラインビュー は、並行処理の問題、転送オーバーヘッド、アイドル期間を特定するのに役立つ。例えば、以下のコードを実行すると、カーネル起動の重複、CPU準備のギャップ、データ転送のタイミング、NVTXマーク付き範囲を示す詳細なタイムラインが生成される:

nsys profile \ --trace=... \ --capture-range=... \ --force-overwrite=true \ <application> ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

注目すべきレーダーのトレンド2026年1月 (Japanese Edition)

注目すべきレーダーのトレンド2026年1月 (Japanese Edition)

Mike Loukides

Publisher Resources

ISBN: 0642572281526