performance-optimization

Routes confirmed performance bottlenecks to the correct optimization module for MindIE-SD diffusion models.

14|5|Updated Mar 30, 2026
One-click install
npx skills add https://github.com/Ascend/MindIE-SD --skill performance-optimization-ascend
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performance-optimization
Source: https://github.com/Ascend/MindIE-SD/tree/main/.agents/skills/performance-optimization
Command: npx skills add https://github.com/Ascend/MindIE-SD --skill performance-optimization-ascend

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? When optimizing diffusion model inference on MindIE-SD, teams often jump straight into tuning without knowing which component (DiT compute, DiT communication, VAE decoding, or host overhead) is actually the bottleneck, leading to wasted effort on the wrong target. This Skill acts as the optimization domain entry point: it takes an already-identified bottleneck label and dispatches the task to the correct specialized optimization module, while enforcing prerequisites and acceptance criteria. ## Core Features & Use Cases - Bottleneck-based dispatch: Maps bottleneck labels (DiT compute-bound, DiT communication-bound, non-DiT decode stage, non-DiT host stage, consistency failure) to the right module: dit-perf-opt, dit-parallel-opt, vae-opt, or host-opt. - Prerequisite gating: Requires a working environment, a completed end-to-end run, and baseline numbers before any optimization starts; tasks missing these are returned to model-auto-optimization. - Anchor enforcement: Rejects user-declared bottlenecks without a measured anchor (stage breakdown row or kernel percentage) to prevent optimizing the wrong component. - Unified acceptance criteria: Performance numbers follow perf-gate same-window A/B comparison, differences under 3% are treated as noise, and lossy features must pass accuracy-gate three-level verification. - Use Case: A profile shows MatMul kernels taking 62% of DiT time. The Skill maps this anchor to the DiT-compute-bound label and dispatches the task to dit-perf-opt for feature tier selection, with results validated via perf-gate. ## Quick Start Tell the AI your measured bottleneck anchor, for example: profile shows DiT MatMul at 62% with no exposed communication, and ask it to route the optimization task to the right module.

Frequently Asked Questions about performance-optimization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I route a confirmed bottleneck to the right optimization module?

Provide a measured anchor such as a stage breakdown row or kernel occupancy percentage. The anchor maps to a bottleneck label, which dispatches the task: DiT compute-bound goes to dit-perf-opt, communication-bound to dit-parallel-opt, decode-stage to vae-opt, and host-stage to host-opt.

What should I do if I don't know where the bottleneck is yet?

Tasks with unidentified bottlenecks do not enter this entry point. They are routed to model-auto-optimization, which is the only layer with analysis authority, and it returns a bottleneck label before dispatch happens here.

What prerequisites are required before starting performance optimization?

Three conditions must all hold: the environment works (import mindiesd succeeds or the framework can serve), the model has completed one end-to-end run, and baseline numbers exist under the same measurement口径. Missing any one returns the task to model-auto-optimization stage S0.

Why was my optimization request rejected when I reported slow VAE decoding?

User-declared bottlenecks without a measured anchor are rejected because declarations often mismatch reality; for example, reported slow decoding frequently turns out to be DiT-dominated after stage breakdown. Provide a profiling anchor or let model-auto-optimization locate the bottleneck first.

How are optimization results validated before being recorded?

Performance numbers follow perf-gate same-window A/B comparison, and differences under 3% versus baseline are treated as noise. Lossy features must additionally pass accuracy-gate three-level verification including bitwise, numeric threshold with md5, and quality gates.

When should the optimization loop stop?

Stop when the target performance is met on the target hardware, when remaining gaps are under the 3% noise threshold, when the root cause lies in external components like CANN, TorchNPU, or HCCL, or when NPU physical memory or bandwidth limits are reached.