docs: complete TraceLens docs migration + consolidate the SDK analysis guide#824
Conversation
d982c5c to
8c85ca5
Compare
Port the remaining loose docs from docs_original into the rocm-docs-core
site under docs/, following the established ROCm documentation conventions
(MyST, {meta} blocks, "Related topics", sentence-case headings, copyright
headers).
New pages:
- reference/perf-report-columns (column glossary)
- conceptual/: trace2tree (merged with motivation), torch-profiling-analysis,
shape-metadata, gemm-analysis (merged), perf-model-walkthrough
- how-to/: tree-perf-analysis, gpu-event-analysis, compare-perf-reports,
nccl-analysis, origami-integration
- tutorials/: torch-profiling, distributed-profiling, anomaly-detection
notebooks, rendered via myst-nb (rocm-docs-core bumped 1.22 -> 1.32,
notebook execution disabled at build time)
Wire the new Concepts, Tutorials, and Reference entries into _toc.yml.in and
the index.rst landing cards. Repoint all inbound links (README, CODEOWNERS,
API reference, agent READMEs) from docs_original to the new pages and retire
the migrated docs_original files (only the deferred Agentic_Mode entry remains).
Co-authored-by: Cursor <cursoragent@cursor.com>
Author a proper how-to/agentic-mode topic from the TraceLens Agent README (analysis modes, prerequisites, chat and headless CLI usage, report anatomy, workflow architecture) and wire it into the How-to nav and landing cards. Delete the last docs_original file (the deferred Agentic_Mode symlink) and the now-empty docs_original directory, completing the migration to the ROCm docs tree. The copyright regression test now passes cleanly (the Windows-only symlink false-positive is gone). Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
0dab3a8 to
970f254
Compare
…ample in collective report Co-authored-by: Cursor <cursoragent@cursor.com>
…ncepts Recover inference content that was dropped in the migration into the rendered docs: - generate-perf-report-pytorch-inference.md: restructure into an end-to-end workflow (collect -> split -> generate -> merge) with the vLLM/SGLang build tables, profiler-config flags, and the split_inference_trace_annotation steady-state workflow. - conceptual/inference-analysis.md: new page covering the paged-attention roofline model (prefill/decode FLOPS, elements moved, aggregate annotations) and the steady-state region derivation. Co-authored-by: Cursor <cursoragent@cursor.com>
…rf model guide Reorganize the core-feature docs so the SDK story lives in one place and the analytical perf model gets its own home: - how-to/sdk-analysis.md: new consolidated guide covering tree loading and traversal (TreePerfAnalyzer), GPU timeline summaries (GPUEventAnalyser), per-op GPU time, roofline metrics, and nn.Module GPU-time attribution. Absorbs the former tree-perf-analysis.md and gpu-event-analysis.md. - conceptual/trace2tree.md: slim down to the call-tree concept; SDK traversal how-to content moved to sdk-analysis.md. - how-to/perf-model-without-trace.md: new guide for computing analytical FLOPs/bytes for GEMM/SDPA ops without any trace. - Remove tree-perf-analysis.md and gpu-event-analysis.md; repoint inbound links and update the TOC. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…SDK-vs-report framing Co-authored-by: Cursor <cursoragent@cursor.com>
…al SDK output - Remove invented per-module GPU-time values from the nn.Module attribution diagram; show the real pretty-printer format with placeholders and defer actual numbers to the notebook. Fix the label to Non-nn.Module GPU Time. - Correct the roofline example table to the real summarize_df_perf_metrics schema (param: M/N/K/bias, FLOPS/Byte_first, TFLOPS/s_mean) using values from the legacy tree-perf doc. - Restore the parent-chain traversal example and GPU-timeline metric definitions that were dropped when the legacy docs were consolidated. Co-authored-by: Cursor <cursoragent@cursor.com>
The per-module numbers removed in the previous commit were not fabricated - they come from the published torch-conference poster (a DeepSeek-V2 decoder layer). Restore the full tree with the authoritative values and include the nodes that had been dropped (RMSNorm, ReplicatedLinear, ColumnParallelLinear, DeepseekScalingRotaryEmbedding, and the DeepseekV2MLP children). Co-authored-by: Cursor <cursoragent@cursor.com>
devalshahamd
left a comment
There was a problem hiding this comment.
Two minor comments, otherwise LGTM!
| --> | ||
|
|
||
| # Inference performance analysis in TraceLens | ||
| ```{meta} |
There was a problem hiding this comment.
This is rendered in the GitHub GUI. Is that expected?
There was a problem hiding this comment.
Yes, expected. This is the MyST {meta} directive that Sphinx/Read the Docs turns into invisible HTML tags (description/keywords for SEO). GitHub's markdown preview doesn't process MyST directives, so it shows the raw fenced block here, but it renders correctly and invisibly on the docs site. Every migrated page uses the same block for consistency.
|
|
||
| ## Before you begin | ||
|
|
||
| Before generating a report, confirm you have the following: |
There was a problem hiding this comment.
I think We can remove this before you begin step since the next steps have details on how to collect traces.
There was a problem hiding this comment.
Good call - trimmed in a0f999d. Dropped the trace-file bullets that duplicated the Collect and Merge sections right below, keeping only the genuine prerequisites (TraceLens installed + an inference setup).
Drop the trace-file prerequisites that duplicated the Collect and Merge sections that immediately follow; keep only the genuine prerequisites (install + an inference setup). Addresses review feedback. Co-authored-by: Cursor <cursoragent@cursor.com>
Brief specification in `compare-traces.md`. More thorough specification in `agent.md`.
Co-authored-by: Cursor <cursoragent@cursor.com>
…ff extension The comparative agent wraps TraceDiff (one of the two matching methods) rather than being a third way to compare, so revert the intro to two ways and keep the agent framed as an extension of TraceDiff. Also tidy trailing whitespace. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
## Summary #824 retired the `docs_original/` directory as part of the docs migration. #823 (branched before #824 and merged just after it) reintroduced a link to `docs_original/Inference_analysis.md`, which no longer exists on `main` — leaving a dead link in `TraceLens/Agent/Profiling/README.md`. This repoints that reference to the migrated how-to page and restores the descriptive link text. - `docs_original/Inference_analysis.md` (deleted) -> `docs/how-to/generate-perf-report-pytorch-inference.md` ## Test plan - [ ] Link resolves to the migrated inference how-to page Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
Completes the documentation migration by porting the remaining legacy topics from
docs_original/into the rocm-docs-core site underdocs/, then reorganizing the core-feature docs so the SDK story lives in one place. Follows the conventions used across the existing pages (MyST,{meta}blocks, "Related topics", sentence-case headings, copyright headers).Migrated pages + 3 tutorial notebooks:
perf-report-columns(full column glossary)trace2tree(concept-only),torch-profiling-analysis,shape-metadata,gemm-analysis(mergedaimodels_gemms+gemm_dim_eff),inference-analysis(paged-attention roofline model),triton-perf-model-walkthroughsdk-analysis,perf-model-without-trace,generate-perf-report-pytorch-inference(end-to-end workflow),compare-perf-reports,nccl-analysis,origami-integration,agentic-modetorch-profiling,distributed-profiling,anomaly-detectionnotebooks, rendered viamyst-nbCore-feature docs reorg:
how-to/sdk-analysis— new consolidated SDK guide: tree loading/traversal (TreePerfAnalyzer), GPU-timeline breakdown (GPUEventAnalyser), per-op GPU time, roofline metrics, adding a new op, andnn.Moduleattribution. Absorbs the formertree-perf-analysisandgpu-event-analysishow-tos.conceptual/trace2tree— slimmed to the call-tree concept; SDK traversal how-to content moved intosdk-analysis.how-to/perf-model-without-trace— new guide for analytical FLOPs/bytes from shapes alone (no trace).how-to/generate-perf-report-pytorch-inference— restructured into collect → split → generate → merge, with the vLLM/SGLang build tables, profiler flags, and the steady-statesplit_inference_trace_annotationworkflow; conceptual roofline math split out toconceptual/inference-analysis.Infra:
_toc.yml.inandindex.rstlanding cards updated with Concepts, Tutorials, and the new Reference/How-to entriesrocm-docs-corebumped1.22.0→1.32.0(its built-inmyst-nbrenders the notebooks; execution disabled at build time vianb_execution_mode = "off")docs_originalto the new pages (README, CODEOWNERS, API reference, agent READMEs)CODEOWNERS— added inference-doc ownership (how-to/generate-perf-report-pytorch-inference,conceptual/inference-analysis)docs_original/fully retired (directory removed)main.Content-fidelity check
Every example in
sdk-analysisis traceable to a real source (verified against git history / source / the torch-conference poster): GPU-timeline / per-op / roofline tables from the legacytree-perf-analysis; subtree + parent-chain examples from the legacytrace2tree; timeline metric definitions from the legacygpu-event-analysis; thenn.ModuleGPU-time tree from the poster; and all SDK method names verified present inTraceLens/.Decisions worth a look
TreePerf+GPUEventAnalyserhow-tos merged into onesdk-analysispage;trace2treekept concept-only.perf-model-without-tracehow-to (no trace required).conceptual/gemm-analysispage.Validation
Test plan