From 569899e8d9a1aacc8baae811b17b7e5cc9aa5851 Mon Sep 17 00:00:00 2001 From: Samit <285365963@qq.com> Date: Tue, 28 Apr 2026 10:21:11 +0800 Subject: [PATCH] [Docs] Add performance profiling step to add-diffusion-model skill (#3196) Signed-off-by: SamitHuang <285365963@qq.com> --- .claude/skills/add-diffusion-model/SKILL.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.claude/skills/add-diffusion-model/SKILL.md b/.claude/skills/add-diffusion-model/SKILL.md index 0b979e1a9..212e8b02c 100644 --- a/.claude/skills/add-diffusion-model/SKILL.md +++ b/.claude/skills/add-diffusion-model/SKILL.md @@ -544,6 +544,15 @@ Pipelines without `SupportsModuleOffload` fall back to scanning well-known attribute names (`transformer`, `text_encoder`, `vae`, etc.), which fails for non-standard names. +### Step 12: Performance Profiling + +After verifying correctness and implementing parallelism/caching, profile the model's performance to identify bottlenecks and ensure optimal execution. + +See the [Profiling Single-Stage Diffusion](../../../docs/contributing/profiling.md#3-profiling-single-stage-diffusion) guide for detailed instructions on: +1. Using the PyTorch profiler (`profiler: "torch"`) to capture detailed CPU/CUDA traces. +2. Using Nsight Systems (`nsys`) with `profiler: "cuda"` for low-overhead CUDA traces. +3. Controlling profiling via `omni.start_profile()` and `omni.stop_profile()`. + --- ## Iterative Development Tips