operator-dev

Route operator development and optimization tasks to cannbot-skills with MindIE-SD-specific integration guidance.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Developing and tuning NPU operators (Triton, Ascend C, Catlass, PyPTO, TileLang) for MindIE-SD requires knowing which external skill chain to follow and which MindIE-SD/CANN-specific pitfalls apply, and this Skill provides that routing map plus repository-specific integration experience. ## Core Features & Use Cases - Scenario-to-skill routing: Maps operator tasks to the external cannbot-skills chains (triton-task-extractor through triton-op-verifier, plus Ascend C, Catlass, PyPTO, and TileLang chains) via references/operator-optimization-skill-map.md. - MindIE-SD integration knowledge: Documents kernel rebuild caching pitfalls, CANN built-in operator name conflicts, Ascend C API traps, catlass kernel integration (single .so ASC mixed compilation), and runtime deployment verification. - Fusion DSL boundary rules: Enforces catlass for CV fusion with matmul and triton for pure vector elementwise fusion, with a six-stage pipeline for quantized matmul plus activation fusion operators. - Use Case: When asked to write a triton kernel or speed up an operator, the Skill routes to the cannbot latency-optimizer chain while applying MindIE-SD constraints such as L2-flush benchmarking discipline and kernel diff methodology. ## Quick Start Ask the assistant to help write or optimize a Triton or Ascend C operator for MindIE-SD and it will route you to the right cannbot skill chain with repository-specific guidance.

Frequently Asked Questions about operator-dev

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

FAQPage Schema
How do I write and optimize a Triton kernel for Ascend NPU?

Follow the cannbot-skills chain routed by the skill map: triton-task-extractor, triton-op-designer, triton-op-coding, then triton-latency-optimizer for performance tuning. Apply MindIE-SD-specific guidance in parallel, such as warm/cold benchmark measurement and kernel diff methodology.

When should I use catlass versus triton for operator fusion?

Use catlass for CV fusion containing matmul, such as quantized matmul plus activation epilogue, where cube unit gains exist. Use triton for pure vector elementwise fusion like swiglu or gating without matmul, since catlass provides no benefit there.

Why does my modified kernel show no behavior change after rebuild?

Custom operator kernel objects are cached by tiling-key hash, so source changes without key changes reuse old binaries. Perform a full clean rebuild, verify with md5 checksums, and use the sentinel method of adding an observable semantic change to confirm the new kernel runs.

How do I fix inferShape function does not exist errors for custom operators?

Import mindiesd before initializing the NPU or creating tensors, since custom operator registration fails after GE initialization. If the error persists, the operator package has not entered the runtime CANN environment, which is a deployment issue rather than a parameter problem.

What happens if the cannbot-skills library is not installed?

Run scripts/install_cannbot.sh on Linux or install_cannbot.ps1 on Windows to clone it to ~/.cannbot-skills. If unavailable, the Skill skips external loading as an availability fallback while repository-specific experience still applies, and the gap is logged for review.

Why did my register_replacement pattern match but hurt performance?

A pattern hit does not guarantee benefit; check kernel form first, since triton codegen memory access may be worse than hand-tuned aclnn kernels. Follow the kernel diff to per-pass AB testing to R1-R5 root cause workflow in the benefit rootcause guide.