Skip to content

docs(musa): Moore Threads support matrix, vendor section and pinned torch_musa 2.7.1 profile - #44

Merged
baicai-1145 merged 2 commits into
pymss-project:mainfrom
baicai-1145:cn-gpu-pr
Nov 9, 2026
Merged

baicai-1145 merged 2 commits into
pymss-project:mainfrom
baicai-1145:cn-gpu-pr

Conversation

@baicai-1145

Copy link
Copy Markdown
Member

Follow-up to #40, which was squash-merged: the 66 commits it carried became a single commit on main, so this branch had to be rebased onto the new main before it could be proposed again. cn-gpu-pr is now main + 2 commits, nothing else.

What

Adds Moore Threads (MUSA) to the compatibility matrix and pins the measured torch_musa 2.7.1 profile.

Measured on MTT S70 (capability (2,1)) with torch 2.7.1 + torch_musa 2.7.1 + MUSA SDK 4.3.0.CC2.1 + driver 3.3.0; this port targets 2.7.1 by default.

Changes

  • README.md / README_CN.md: new MUSA row (musa/moore, torch_musa 2.7.1).

  • docs/cn-gpu.md (+80): MUSA row, auto-detection order, PYMSS_DEVICE_BACKEND value, and a measured vendor section covering

    • the 春晓 (Chunxiao) version ceiling,
    • the measured capability gaps (complex scatter/index, complex pad, fp16 conv, flash SDPA, half muFFT),
    • the 11-family benchmark at 10 s audio,
    • the fused RoPE kernel, which turned out to be worth using (7.6x: mel_band 3.31 → 3.09 s, bs_roformer 2.88 → 2.14 s) — recorded together with how to feed it (per-element angle table with rotary_interleaved=True) and why its output layout is equivalent to the reference path,
    • the vendor-only operators that were measured and rejected, with the numbers that justify each rejection,
    • and the traps hit along the way.

    It deliberately does not document how to build torch_musa (installing the vendor torch is the deployer's job) and does not compare against older torch_musa releases, since 2.7.1 is the baseline.

  • test/test_backends_musa.py: the profile assertions pinned to the measurements above.

Note on the branch

upstream/main (7d599ea) has the same tree as the old PR head (b61049c), so the rebase was conflict-free and git diff <old head> <new head> is empty — the content is byte-identical to what was reviewed before, minus the commits that are already in main.

Adds MUSA to the compatibility tables and a measured vendor section.  Measured on
MTT S70 (capability (2,1)) with torch 2.7.1 + torch_musa 2.7.1 + MUSA SDK
4.3.0.CC2.1 + driver 3.3.0; this port targets 2.7.1 by default.

* README.md / README_CN.md: new MUSA row (`musa`/`moore`, torch_musa 2.7.1);
* docs/cn-gpu.md: MUSA row, auto-detection order, `PYMSS_DEVICE_BACKEND` value, and
  a section covering the 春晓 (Chunxiao) version ceiling, the measured capability
  gaps (complex scatter/index, complex pad, fp16 conv, flash SDPA, half muFFT), the
  11-family benchmark at 10 s audio, and the traps we hit;
* the fused RoPE kernel turned out to be worth using (7.6x, mel_band 3.31 -> 3.09 s,
  bs_roformer 2.88 -> 2.14 s), so the section records how to feed it (per-element
  angle table with `rotary_interleaved=True`) and why its output layout is
  equivalent to the reference path;
* the other vendor-only operators are recorded as measured-and-rejected, with the
  numbers that justify it;
* the section deliberately does not document how to build torch_musa -- installing
  the vendor torch is the deployer's job -- and does not compare against older
  torch_musa releases, since 2.7.1 is the baseline.
The profile contract still asserted the torch_musa 2.5.0 workarounds.  On 2.7.1
the native paths work (rfft/irfft 1.9e-07, complex-by-real 0, complex cat/fill,
`_thnn_fused_gru_cell`, `_native_multi_head_attention`), so those flags flip to
their native defaults and only the three real gaps are left: no complex
`scatter_add_`/`index_add_`, no fp16 FFT, and fp16 autocast aborting on real
models (MUDNN's fused fp16 conv, bfloat16 datacast).

Measured on MTT S70 + torch 2.7.1 + torch_musa 2.7.1 + MUSA SDK 4.3.0.
@baicai-1145
baicai-1145 merged commit f35f7c7 into pymss-project:main Nov 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants