moe-and-acceleration
Use this repo skill for Swin-Transformer optional Swin-MoE, Tutel, Apex, fused window-process CUDA extension, distributed checkpoint, and backend probe workflows.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- moe-and-acceleration
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Use this repo skill for Swin-Transformer optional Swin-MoE, Tutel, Apex, fused window-process CUDA extension, distributed checkpoint, and backend probe workflows.
- disable-model-invocation
- true
02 资源文件 3
- 参考文档references/moe-and-acceleration.md2.0 KB
- 参考文档references/troubleshooting.md1.4 KB
- 脚本scripts/check_optional_backends.py2.4 KB
03 SKILL.md 正文
moe-and-acceleration
Use this sub-skill when a task involves Swin-MoE, Tutel, optional Apex fused layernorm/optimizers, --fused_window_process, the CUDA window-process extension, or distributed MoE checkpoint behavior.
Covers
main_moe.pycommand shape and distributed expectations.MODEL.SWIN_MOEconfig fields: experts, top-k, capacity factor, router type, aux loss, and MoE block placement.- Tutel dependency and why CPU is not a truthful substitute for MoE runtime verification.
- Optional
swin_window_processCUDA extension build/probe guidance. - Apex optional flags: fused layernorm,
fused_adam,fused_lamb. - Rank-sharded MoE checkpoints and save/load caveats.
Routes elsewhere
- Baseline Swin/SwinV2/Swin-MLP constructors:
core-models. - Ordinary supervised
main.pycommands:training-eval-cli. - Generic checkpoint flag meaning and data layouts:
data-and-checkpoints. - SimMIM commands:
simmim-workflows.
Workflow
- Run
scripts/check_optional_backends.pyto see which optional backends are actually available. - Read
references/moe-and-acceleration.mdfor command and config rules. - If a command is requested, build it with the root
scripts/swin_cli_command_builder.py --workflow moe-trainormoe-eval. - If backend probes fail, read
references/troubleshooting.mdand avoid claiming runtime verification.
Verification boundary
CPU import checks are not evidence that Tutel MoE, Apex fused ops, or the custom CUDA extension works. Treat those as optional backend capabilities that require compatible CUDA/PyTorch/toolkit/runtime evidence.
Linked files
references/moe-and-acceleration.md- MoE and optional acceleration workflow details.references/troubleshooting.md- missing Tutel/Apex/fused-kernel and distributed checkpoint issues.scripts/check_optional_backends.py- safe optional backend probe.
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).