PyTorchプロファイラー(プログラム実行時の性能測定ツール)トレース分析を、TraceLensという複数の機能を組み合わせた仕組みで統合管理します。 具体的には以下を実行します: - 性能レポートを生成 - カテゴリーデータを準備 - システムレベル分析とコンピュート・カーネル分析(演算処理の詳細部分の分析)を並行して実施 - 出力結果を検証 - 関係者ごとの優先度を付けたレポート(analysis.md)を作成 **次のような場合に使用:** ユーザーが分析オーケストレーター(統合制御ツール)に従うよう要求した場合、エージェント分析ワークフロー(自動化された一連の分析処理)を実行する場合、トレースを分析する場合、2つのトレースを比較する場合、またはスタンドアロン(単独)またはトレース同士の比較分析をTraceLensで行うことに言及した場合。
Orchestrates modular PyTorch profiler trace analysis with TraceLens: generates perf reports, prepares category data, runs system-level and compute-kernel subagents in parallel, validates outputs, and writes a prioritized stakeholder report (analysis.md). Use when the user asks to follow the analysis orchestrator, run the agentic analysis workflow, analyze a trace, compare two traces, or mentions standalone or comparative TraceLens analysis.
システムレベルの分析(CPU/アイドル状態、カーネル融合、マルチカーネル・通信・メモリコピー)と計算カーネルの分析(GEMM、SDPA、要素ごとの演算など)を調整します。トレース(実行記録)を一度読み込み、準備を共有した上で、複数の分析エージェントを並行実行し、結果をanalysis.mdにまとめます。
すべてのステップについて、reference.md に従ってください(ユーザー入力の求め方、<prefix> / {CMD} の使い方、コマンド実行、サブエージェント(補助的な分析役)の起動テキスト、検証、レポート出力順序、図の埋め込み、トレース診断を含む)。
0. ユーザー入力を取得(プラットフォーム、トレースファイルのパス、分析モード、環境設定)
1. パフォーマンスレポートを生成(分析モード分岐:学習 vs 推論、比較対象の範囲)
2. トレース品質チェック → 確定的なフォールバック分析
3-6. カテゴリデータを準備(GPU使用率、上位オペレーション、ツリー構造、マルチカーネルデータ、カテゴリフィルタリング)
7. システムレベル分析(並行実行)→ system_findings/ に保存
8. 計算カーネル用サブエージェント(並行実行)→ category_findings/ に保存
8.5. 集約 → priority_data.json::findings[] に統合
9. サブエージェント出力を検証
10. 検出結果を読み込み + モデル特定(サブエージェント)→ metadata/model_info.json
11. agent_extension.py がない場合、パフォーマンスPNG図を生成
12. analysis.md を生成(オーケストレーターが <prefix> tee で書き込み)、拡張機能を追加、PNG を埋め込む
サブエージェント: Task ツールは reference.md で「サブエージェント」と明記されたステップ(7、8、10)のみで使用してください。オーケストレーターはステップ 8.5 を含む他のすべてを、<output_dir>/cache/cmd_prefix.txt のコマンドプレフィックス({CMD} に置換)を使って実行します。
言語: ベンダー中立的な用語(GPU カーネル、集団通信、ベンダー GEMM ライブラリ、DNN プリミティブ、GPU グラフ)を優先してください。トレースデータの引用時は、実際のカーネル名でも構いません。
サブエージェントプロンプト: 各サブエージェントに対して、TraceLens/Agent/Analysis/skills/analysis-orchestrator/agents/<name>.md にチェックインされているエージェントファイルを指定してください(正確なパスとプロンプトテンプレートは reference.md を参照)。
<output_dir>/analysis.mdsystem_findings/、category_findings/、category_data/、metadata/、perf_report*.xlsx、CSV フォルダなど(レイアウトはパッケージ README を参照)このスキルに付属するサブエージェント:TraceLens/Agent/Analysis/skills/analysis-orchestrator/agents/*.md
<!-- Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved.
See LICENSE for license information. -->
Coordinate system-level analysis (CPU/idle, kernel fusion, multi-kernel / comm / memcpy) and compute-kernel analysis (GEMM, SDPA, elementwise, etc.): one trace load, shared prep, parallel subagents, then aggregation into analysis.md.
Follow reference.md for every step (user prompts, <prefix> / {CMD} usage, CLI commands, subagent launch text, validation, report tee order, plot embedding, and trace diagnostics).
0. Query User Inputs (Platform, Trace Path(s), Analysis Mode, Environment Setup)
1. Generate Performance Report (branches on analysis mode: training vs inference then, comparison scope)
2. Trace-Quality Gate → Deterministic fallback analysis
3-6. Prepare Category Data (GPU Util, Top Ops, Tree Data, Multi-Kernel Data, Category Filtering)
7. System-Level Analysis (PARALLEL) → system_findings/
8. Compute Kernel Subagents (PARALLEL) → category_findings/
8.5. Aggregate → priority_data.json::findings[]
9. Validate Subagent Outputs
10. load_findings + Model Identification (subagent) → metadata/model_info.json
11. Render performance PNG if agent_extension.py is absent
12. Generate analysis.md (orchestrator writes via <prefix> tee), optional extension, embed PNG
<output_dir>/cache/cmd_prefix.txt ({CMD} substitution).TraceLens/Agent/Analysis/skills/analysis-orchestrator/agents/<name>.md (see reference.md for exact paths and prompt shells).<output_dir>/analysis.mdsystem_findings/, category_findings/, category_data/, metadata/, perf_report*.xlsx, CSV folders — see package README for layout.Project subagents ship with this skill: TraceLens/Agent/Analysis/skills/analysis-orchestrator/agents/*.md.
原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。