framework-integration

Enable and verify mindiesd inference features in third-party frameworks like vLLM-Omni and LightX2V.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? When deploying diffusion models through third-party inference frameworks (vLLM-Omni, DiffSynth-Engine, LightX2V, diffusers) on Ascend NPUs, framework-side features such as quantization, sparsity, caching, and kernel fusion often fail to take effect or are entirely missing. This Skill provides a two-branch workflow to either enable and verify existing framework features (Branch A) or develop missing structural capabilities (Branch B), with rigorous evidence requirements to prevent false speedup claims. ## Core Features & Use Cases - Feature Enablement & Verification (Branch A): Diagnose why quantization/sparsity/cache switches show no effect, fix enablement anomalies, and validate with a counting contract plus three-layer evidence (graph hits, kernel diff, wall-clock A/B). - Gap-Filling Development (Branch B): Add missing structural capabilities to frameworks via injection points (config registries, operator dispatch, model-layer rewrites, _compiled_call_impl) with four merge postures from platform registration to monkey-patch probes. - Use Case: A user reports that enabling torch.compile with MindieSDBackend in vLLM-Omni shows zero pattern hits. The Skill guides checking _compiled_call_impl assignment, backend instance reuse, and kernel-level verification via kernel_details.csv. ## Quick Start Ask the agent to enable and verify a mindiesd feature such as cache or quantization in a specific framework like vLLM-Omni and confirm it with kernel-level evidence.

Frequently Asked Questions about framework-integration

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

FAQPage Schema
How do I enable mindiesd kernel fusion in vLLM-Omni or DiffSynth-Engine?

Use torch.compile with MindieSDBackend and write the result into each submodule's _compiled_call_impl, since torch.compile alone does not modify the module. Reuse a single backend instance to avoid Dynamo recompilation, then verify with kernel_details.csv.

Why does torch.compile show zero pattern hits after integration?

The most common cause is not assigning the compiled result to _compiled_call_impl, so warmup matches eager and no patterns fire. Also check backend instance reuse and confirm hits via DOT graph dumps or kernel_details.csv, since DEBUG logs truncate at 2048 characters.

How do I verify a cache or sparsity feature actually works and is not a no-op?

Require runtime counting evidence: cache reuse counts, sparse kernel invocations, or fused kernel execution counts recorded in artifacts. If framework step counters are unfilled, use kernel-level counts where cached steps show an order-of-magnitude drop in FA, MatMul, and RMSNorm kernels.

What should I do when a framework lacks a capability like cache or comm-stream masking?

Follow Branch B: reproduce the gap with a minimal case, choose a merge posture (platform registration preferred, then upstream PR, pinned fork, or monkey-patch probe), implement at the correct injection point, and validate with output consistency plus the counting contract.

Why does import order matter for custom Ascend operators?

Custom CANN operators built by mindiesd are only registered when import mindiesd sets ASCEND_CUSTOM_OPP_PATH. You must import mindiesd before initializing the NPU or creating tensors, otherwise GE fails with inferShape function does not exist errors.

When should compile integration be rolled back instead of kept enabled?

Roll back when controlled interleaved A/B testing shows differences within the noise threshold (under 3 percent), or when compilation changes numerical semantics so outputs are not byte-identical to eager. Never leave features in a half-enabled state without evidence.