tracelens-analysis-orchestrator

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
<!-- Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. See LICENSE for license information. -->
<!-- Copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved. See LICENSE for license information. -->

Analysis orchestrator

分析编排器

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
.
协调系统级分析(CPU/空闲状态、内核融合、多内核/通信/内存复制)与计算内核分析(GEMM、SDPA、逐元素运算等):单次加载追踪数据、共享预处理流程、并行运行子Agent,最终将结果汇总至
analysis.md

Full procedure

完整流程

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).
每一步均需遵循**reference.md**(包括用户提示、
<prefix>
/
{CMD}
用法、CLI命令、子Agent启动文本、验证流程、报告
tee
命令顺序、图表嵌入及追踪诊断)。

Workflow index

工作流索引

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-5. Prepare Category Data (GPU Util, Top Ops, Tree Data, Multi-Kernel Data, Category Filtering)
6. System-Level Analysis (PARALLEL) → system_findings/
7. Compute Kernel Subagents (PARALLEL) → category_findings/
   7.5. Aggregate → priority_data.json::findings[]
8. Validate Subagent Outputs
9. load_findings + Model Identification (subagent) → metadata/model_info.json
10. Render performance PNG if agent_extension.py is absent
11. Generate analysis.md (orchestrator writes via <prefix> tee), optional extension, embed PNG
0. 查询用户输入(平台、追踪文件路径、分析模式、环境配置)
1. 生成性能报告(根据分析模式分支:训练 vs 推理,再区分对比范围)
2-5. 准备分类数据(GPU利用率、Top算子、树形数据、多内核数据、分类过滤)
6. 系统级分析(并行执行)→ system_findings/
7. 计算内核子Agent(并行执行)→ category_findings/
   7.5. 汇总结果 → priority_data.json::findings[]
8. 验证子Agent输出
9. 加载结果 + 模型识别(子Agent)→ metadata/model_info.json
10. 若agent_extension.py不存在则渲染性能PNG图
11. 生成analysis.md(编排器通过<prefix> tee命令写入),可选扩展功能,嵌入PNG图

Rules

规则

  • Subagents: Use the Task tool only where reference.md says “subagent” (Steps 6, 7, 9). The orchestrator runs everything else, including Step 7.5, using the command prefix from
    <output_dir>/cache/cmd_prefix.txt
    (
    {CMD}
    substitution).
  • Language: Prefer vendor-agnostic terms (GPU kernels, collective communication, vendor GEMM library, DNN primitives, GPU graph). When quoting trace data, real kernel names are fine.
  • Subagent prompts: Point each subagent at the checked-in agent file under
    TraceLens/Agent/Analysis/skills/analysis-orchestrator/agents/<name>.md
    (see reference.md for exact paths and prompt shells).
  • 子Agent:仅在reference.md标注“subagent”的步骤(步骤679)中使用Task工具。编排器负责运行其他所有步骤,包括步骤7.5,使用
    <output_dir>/cache/cmd_prefix.txt
    中的命令前缀(替换
    {CMD}
    )。
  • **术语规范:**优先使用厂商无关术语(GPU内核、集合通信、厂商GEMM库、DNN原语、GPU图)。引用追踪数据时,可使用真实内核名称。
  • **子Agent提示词:**将每个子Agent指向已签入的代理文件,路径为
    TraceLens/Agent/Analysis/skills/analysis-orchestrator/agents/<name>.md
    (具体路径及提示词模板请参考reference.md)。

Primary outputs

主要输出

  • Deliverable:
    <output_dir>/analysis.md
  • Internals:
    system_findings/
    ,
    category_findings/
    ,
    category_data/
    ,
    metadata/
    ,
    perf_report*.xlsx
    , CSV folders — see package README for layout.
  • 交付物:
    <output_dir>/analysis.md
  • 内部文件:
    system_findings/
    category_findings/
    category_data/
    metadata/
    perf_report*.xlsx
    、CSV文件夹 — 目录结构请参考包内README。

Agent layout

Agent架构

Project subagents ship with this skill:
TraceLens/Agent/Analysis/skills/analysis-orchestrator/agents/*.md
.
本技能附带项目子Agent:
TraceLens/Agent/Analysis/skills/analysis-orchestrator/agents/*.md