Open Infra Skills

A skill for speeding up model training on Moore Threads MUSA GPUs: baseline, profiling, MFU and numerical correctness checks

  • 139 ★ on the repository
  • Last commit
Skill

Extended access

Why this level

  • The skill runs scripts and profilers on a machine with accelerators.
  • Optimizations change training code, so results are checked against the baseline run.
All reasons and checks

open-infra-skills/infra-skills

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add skills/open-infra-skills

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The skill runs scripts and profilers on a machine with accelerators.
  • Optimizations change training code, so results are checked against the baseline run.

This is third-party code. Review the repository files before installing.

What it does

The repository collects portable skills for AI infrastructure engineers. It holds one skill so far, `optimize-musa-training`, which walks an agent through baseline, profile, optimization and correctness checks for training on Moore Threads (MUSA) GPUs. The skill keeps three evidence layers apart: framework step timing, system traces and kernel counters. It does not label profiler FLOPs as MFU without stating the definition. Alongside sit references on environment setup, measurement and speedup techniques (FlashAttention 2, `torch.compile`, FSDP, MCCL), an S5000 case study and the scripts `musa_env_report.py`, `compute_mfu.py` and `summarize_steps.py`.

Who it is for. Engineers who train models on Moore Threads GPUs and want faster training without changing model behavior.

Good fit when

  • Training on MTT accelerators runs slower than expected and the cause is unclear.
  • Code is being ported from CUDA to MUSA and performance is being compared.
  • A distributed run hangs on MCCL collectives.
  • MFU and HFU are being computed and it matters what the figure includes.

Not a fit when

  • Training runs on NVIDIA or AMD GPUs: the skill is written for the MUSA stack.
  • You need inference serving or cluster operations: the repository has no such skills yet.
  • Changing the architecture or optimizer math for speed is acceptable: without explicit permission the skill requires preserving model behavior.

Example request

Training on S5000 stalls at low utilization with a small batch. Capture baseline speed, find the bottleneck with the profiler and propose changes with a correctness check.

Limitations

The repository holds one skill; the other categories (distributed training, inference, compilers, observability, clusters) are named as plans and the project is early. The last commit dates from July 2026. Running the scripts needs a machine with MUSA and Torch MUSA. MUSA conclusions cannot be carried over from CUDA: the skill requires detecting driver, SDK, Torch MUSA, muDNN, muBLAS and MCCL versions on the spot. Credentials and internal addresses stay out of public reports.

How to disable. Delete the `optimize-musa-training` folder from the chosen agent skills directory.

FAQ

Which skills exist so far?

Just one: `optimize-musa-training`. The other categories in the README remain plans, and the repository keeps no empty scaffolding.

Is the skill tied to a client OS?

No. It describes target-system behavior and requires neither PowerShell, VS Code, a jump host nor a specific scheduler.

When is a speedup accepted?

After comparison with the baseline run: forward outputs, loss, gradients, memory and steady-state throughput must keep their behavior.

How do I see which skills the repository has?

Run `npx skills add open-infra-skills/infra-skills --list`. A machine-readable list lives in `catalog.json`.

Which scripts ship with the skill?

`musa_env_report.py` builds an environment report, `summarize_steps.py` aggregates steps from a training log and `compute_mfu.py` computes MFU from measured data.

Discussion

No questions or reviews yet.

Skills

Official Modular skills: current Mojo syntax, GPU kernels and the whole model path on MAX from import to profiling

SkillExtended access208Repository stars
Official

Three Intel skills for Linux perf: profiling, finding bottlenecks in code and perf output, and tuning Phoronix benchmarks

SkillExtended access353Repository stars

Over 200 skills for development on Ascend NPU chips: device diagnostics, model conversion, training and profiling.

SkillExtended access182Repository stars

Claude Code skill reading Nsight Compute reports on Blackwell: from a CUDA kernel profile to a diagnosis and an optimization plan.

SkillExtended access274Repository stars

24 skills for microcontroller firmware: build, flash, GDB debugging, UART, Modbus, CAN, logic analyzers and static analysis

SkillBroad access1.1KRepository stars

Claude Code skill for the MSPM0G3507 MCU and K230 camera: pin maps, peripheral drivers, PID and contest task solutions.

SkillMinimal access321Repository stars

README in short

The library aims to grow into self-contained skills for the whole AI systems lifecycle. Its principles are measurement first, correctness as a gate and reproducible experiments. A validation script checks the skills and `catalog.json` is generated automatically.

README badge

Original SKILL.md

---
name: optimize-musa-training
description: Profile, benchmark, debug, and optimize AI training workloads on Moore Threads MUSA GPUs while preserving numerical behavior. Use for Torch MUSA, MTT GPUs, mthreads-gmi, Moore Perf System (msys), Moore Perf Compute (mcu), MFU/HFU, FlashAttention/FA2, SDPA, torch.compile, FSDP/FSDP2, MCCL, distributed hangs, low-batch utilization, kernel launch or transfer overhead, memory pressure, and CUDA-to-MUSA performance migration.
---

# Optimize MUSA Training

Use a measurement-first workflow to improve MUSA training throughput without changing model semantics. Treat framework timing, system traces, and kernel counters as different layers of evidence.

## Guardrails

- Preserve model architecture, data semantics, optimizer math, precision policy, and checkpoint compatibility unless the user explicitly authorizes a change.
- Establish a versioned baseline before editing code. Compare forward outputs, loss, gradients, memory, and steady-state throughput after every retained change.
- Keep profiler overhead out of the throughput denominator. Measure FLOPs in a profiled run and steady step time in an otherwise equivalent non-profiled run.
- Never label profiler-attributed executed FLOPs as model MFU without stating the FLOP definition and coverage. Distinguish useful model FLOPs, executed hardware FLOPs, and profiler-attributed FLOPs.
- Do not infer MUSA behavior from CUDA behavior. Feature-detect the installed driver, SDK, Torch MUSA, muDNN, muBLAS, MCCL, attention backend, and profiler versions.
- Keep cluster transport separate from profiling logic. Do not require PowerShell, VS Code, a jump host, a specific scheduler, or a particular client operating system.
- Keep credentials, internal hostnames, private image registries, dataset paths, and proprietary reports out of public artifacts.

## Route The Task

1. For environment, import, device-selection, or container failures, read [environment-and-preflight.md](references/environment-and-preflight.md).
2. For MFU/HFU, PyTorch profiling, timeline analysis, transfers, or kernel counters, read [measurement-and-profiling.md](references/measurement-and-profiling.md).
3. For FA2, GEMM, compile, launch, memory, dataloader, FSDP, or MCCL optimization, read [optimization-playbook.md](references/optimization-playbook.md).
4. Before retaining any optimization, read [correctness-and-experiments.md](references/correctness-and-experiments.md).
5. For a real low-batch S5000 case and negative results worth avoiding, read [s5000-case-study.md](references/s5000-case-study.md).

## Workflow

### 1. Define The Metric And Invariants

Record:

- workload, model revision, dataset/sample bucket, precision, sequence shape, batch per device, accumulation, device count, and distributed strategy;
- useful-model FLOPs, executed FLOPs, or profiler-attributed FLOPs;
- peak denominator by SKU and precision;
- model behaviors that must remain unchanged;
- target metric such as samples/s, tokens/s, MFU, HFU, memory, or time-to-train.

Do not optimize a mixed workload as though every sample has the longest shape. Benchmark each meaningful bucket and the actual weighted mixture.

Report a problem

Foxx AIOpen Infra Skills
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.