mmdeploy
Route MMDeploy model deployment, backend setup, SDK runtime, extensibility, and validation workflows for OpenMMLab/PyTorch models.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- mmdeploy
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Route MMDeploy model deployment, backend setup, SDK runtime, extensibility, and validation workflows for OpenMMLab/PyTorch models.
- disable-model-invocation
- true
02 资源文件 3
- 参考文档references/repo-provenance.md2.9 KB
- 参考文档references/repo-routing-metadata.json536 B
- 参考文档references/troubleshooting.md5.0 KB
03 SKILL.md 正文
MMDeploy repo skill
Use this repo skill when a task is about deploying PyTorch/OpenMMLab computer-vision models with MMDeploy: converting checkpoints to backend artifacts, preparing or diagnosing inference backends, using SDK model directories, extending export behavior, or validating/profiling exported models.
Read repo provenance before relying on version-sensitive behavior or refreshing this skill. Read root troubleshooting for cross-cutting install/import/version problems before entering a workflow-specific troubleshooting page.
Minimal public setup
Install MMDeploy in an environment that matches the target OpenMMLab codebase and selected backend. Do not install every optional backend by default.
python -m pip install -r requirements/runtime.txt -r requirements/optional.txt
python -m pip install -r requirements/build.txt
python -m pip install . --no-build-isolation
python - <<'PY'
import mmdeploy
from mmdeploy.backend.base import get_backend_manager
print('mmdeploy', mmdeploy.__version__)
print('torchscript backend available:', get_backend_manager('torchscript').is_available())
PY
Backend-specific packages, vendor toolkits, custom ops, SDK runtime libraries, and hardware drivers are selected per route; a CPU import is not proof that TensorRT, RKNN, Ascend, SNPE, VACC, or SDK runtime execution works.
Route map
| User intent | Load this route | First files to read |
|---|---|---|
| Convert a model/checkpoint to ONNX, TorchScript, TensorRT, NCNN, OpenVINO, SDK metadata, or another backend artifact | conversion | conversion workflows, configuration, bundled deploy.py |
| Choose, install, check, or troubleshoot backend packages, converter tools, custom-op libraries, or hardware/toolkit readiness | backends | backends backend matrix, custom ops, bundled check_env.py |
Run an SDK model directory with mmdeploy_runtime, inspect SDK JSON metadata, use C/C++/Java/C# runtime patterns, or analyze SDK profiler output |
sdk | sdk SDK workflows, model directory, bundled sdk_analyze.py |
| Modify MMDeploy internals: rewriters, symbolic overrides, backend/codebase/task support, custom ops, partition marks, or developer tests | extensibility | extensibility rewriters, backend/codebase support, testing |
| Evaluate an exported model, profile latency, run regression matrices, or generate supported backend/model tables | validation | validation evaluation, profiling, regression |
Operating sequence
- Identify the user's concrete artifact and goal: source checkpoint/config, deployment config, backend target, SDK model directory, backend file set, profiler report, or extension point.
- Route to exactly one owning sub-skill first. Use sibling sub-skills only at explicit handoff boundaries, such as conversion failing due to missing TensorRT, or SDK runtime failing because a backend library is absent.
- Prefer bundled helpers in the selected sub-skill over source-repo tools: future agents should run
sub-skills/<id>/scripts/..., not tools from an original checkout. - Keep backend claims scoped to the installed runtime. Optional backend guidance is evidence-backed, but actual runtime success requires the matching backend package/toolkit/hardware.
- For validation or regression, avoid full matrices, downloads, or accelerator runs unless the user explicitly asks and the environment is ready.
Common handoffs
- Conversion produced
deploy.json,pipeline.json, anddetail.json: continue with sdk for runtime use. - Conversion exported IR but backend conversion failed: continue with backends using the failing
backend_config.typeand error message. - A backend model exists and the user asks for accuracy or speed: continue with validation, not SDK runtime guidance.
- A model cannot export because a PyTorch/MMCV op is unsupported or partition marks are missing: continue with extensibility.
- A user asks for general OpenMMLab model training or dataset preparation before deployment: use the relevant upstream codebase skill/documentation; this skill starts at MMDeploy deployment and validation workflows.
Verification status
The generated skill was built for MMDeploy 1.3.1 source evidence. The production environment verified core package importability, API inspection, and CPU TorchScript backend-manager availability. ONNXRuntime, TensorRT, NCNN, OpenVINO, PPLNN, RKNN, Ascend, CoreML, TVM, VACC, SNPE, and mmdeploy_runtime SDK execution are optional/document-backed routes unless the user's current environment verifies them.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).