Skip to content

[CI] flash-mla: Add the sgl-flash-mla release workflow - #45402

Closed
DarkSharpness wants to merge 1 commit into
sgl-project:mainfrom
DarkSharpness:flashmla-release-wheels
Closed

DarkSharpness wants to merge 1 commit into
sgl-project:mainfrom
DarkSharpness:flashmla-release-wheels

Conversation

@DarkSharpness

@DarkSharpness DarkSharpness commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Adds the release workflow for sgl-flash-mla, the wheel built from sgl-project/FlashMLA (the SGLang fork of deepseek-ai/FlashMLA).

Scope: release plumbing only. Nothing in the framework consumes the wheel yet -- no AOT kernel changes, no pyproject.toml dependency. Those come later, separately.

Paired with sgl-project/FlashMLA#19, which does the packaging on the other side (distribution name, VERSION file, metadata). The intended order is: merge that one, register the PyPI project, then merge this.

Files

file what it does
docker/sgl-flash-mla.Dockerfile build image, CUDA 13.4 + torch 2.14.1
scripts/build_sgl_flash_mla.sh build in container, retag, produce the PyPI variant
scripts/rename_sgl_flash_mla_whl.sh linux_<arch> -> manylinux2014_<arch>, add +cu130
scripts/update_flashmla_whl_index.py PEP 503 index under sgl-whl/cu130/sgl-flash-mla/
.github/workflows/release-whl-flashmla.yml build -> GPU tests -> publish

Modelled on release-whl-deepgemm.yml. Three things differ, all because FlashMLA is an AOT-compiled extension rather than a JIT library.

No Python matrix. The wheel is cp310-abi3, and the extensions hold no CPython symbols at all — measured on the built wheel:

undefined CPython (Py*/_Py*) symbols:   0
undefined torch C++ mangled symbols:    0
undefined torch stable C shim:         68

Both register through STABLE_TORCH_LIBRARY during static initialisation and are loaded with torch.ops.load_library, not imported, so neither defines PyInit_*. One wheel per architecture serves CPython 3.10+.

Built with CUDA 13.4, published as +cu130. The kernels need nvcc >= 13.1 for cvt with .scaled::n2::ue8m0, and older toolkits emit suboptimal instructions, so the compiler is pinned to 13.4. The tag describes the runtime instead: the extensions link libcudart.so.13 — SONAME carries only the major version — and call no cudart API newer than 13.0, so they load against the cu130 torch SGLang ships. Verified by loading the wheel under torch 2.10.0+cu128 as well.

The test matrix splits by what each GPU can run. The current kernels are sm_100a/sm_103a, so H200 runs tests/legacy/ (the frozen pre-2026.09.30 kernels, which is where dense MLA decoding lives and the reason SM90 is built at all), while B200 and GB300 run the current suites. Each test job first loads both extensions and resolves an op from each namespace, so a missing symbol surfaces there rather than at the first kernel launch.

The retag step also differs from DeepGEMM's: setuptools tags this wheel cp310-abi3-linux_x86_64, so only the platform part becomes manylinux2014 and the abi3 part is left alone.

Checked locally

The build → retag → index chain was run end to end against a real wheel:

sgl_flash_mla-1.0.0-cp310-abi3-linux_x86_64.whl   (7.9 MB)
  -> sgl_flash_mla-1.0.0+cu130-cp310-abi3-manylinux2014_x86_64.whl
  -> sgl-whl/cu130/sgl-flash-mla/index.html  (with sha256)

The kernels themselves were verified on H200 (sm90) and GB300 (sm103a) at the FlashMLA commit this builds from.

Before merging

Needs a SGL_FLASH_MLA_PYPI_TOKEN repository secret, and the sgl-flash-mla project registered on PyPI. GH_PAT_FOR_WHL_RELEASE already exists and is reused.

🤖 Generated with Claude Code


CI States

Latest PR Test (Base): ✅ Run #39437485584
Latest PR Test (Extra): ❌ Run #39437485414
Latest PR Test (AMD ROCm 10): ➖ No AMD PR run found for this commit.

Builds and publishes wheels for sgl-project/FlashMLA, the SGLang fork of
deepseek-ai/FlashMLA. Release plumbing only -- nothing in the framework
consumes the wheel yet.

Modelled on release-whl-deepgemm.yml, with three differences that come from
FlashMLA being an AOT-compiled extension rather than a JIT library:

- No Python matrix. The wheel is abi3 (cp310-abi3) and its extensions hold no
  CPython symbols at all: both register through STABLE_TORCH_LIBRARY during
  static initialisation and are loaded with torch.ops.load_library rather than
  imported. One wheel per architecture serves CPython 3.10+.

- Built with CUDA 13.4, published as +cu130. The kernels need nvcc >= 13.1 for
  `cvt` with `.scaled::n2::ue8m0`, and older toolkits emit suboptimal
  instructions for them, so the compiler is pinned to 13.4. The tag describes
  the runtime instead: the extensions link libcudart.so.13, whose SONAME
  carries only the major version, and call no cudart API newer than 13.0, so
  they load against the cu130 torch SGLang ships.

- The test matrix splits by what each GPU can run. The current kernels are
  sm_100a/sm_103a, so H200 runs tests/legacy/ -- the frozen pre-2026.09.30
  kernels, which is also where dense MLA decoding lives and the reason SM90 is
  built at all -- while B200 and GB300 run the current suites. Each job first
  loads both extensions and resolves an op from each namespace, so a missing
  symbol surfaces there rather than at the first kernel launch.

The retag step differs from DeepGEMM's too: setuptools tags this wheel
cp310-abi3-linux_x86_64, so only the platform part becomes manylinux2014, and
the abi3 part is left alone.

Needs a SGL_FLASH_MLA_PYPI_TOKEN secret; GH_PAT_FOR_WHL_RELEASE already exists.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@github-actions

This comment has been minimized.

@DarkSharpness DarkSharpness changed the title Add the sgl-flash-mla release workflow [CI] release: Add the sgl-flash-mla release workflow Oct 20, 2026
@DarkSharpness DarkSharpness changed the title [CI] release: Add the sgl-flash-mla release workflow [CI] flash-mla: Add the sgl-flash-mla release workflow Oct 21, 2026
@DarkSharpness DarkSharpness added the run-ci CI: run the baseline test suite on this PR label Oct 21, 2026
@DarkSharpness

Copy link
Copy Markdown
Collaborator Author

(auto generated by Claude)

Superseded by #45651, which moves this branch into sgl-project/sglang so the workflow can be run before merging, and fixes the test jobs (they imported the source package instead of the installed wheel, and the frozen kernels were not tested on SM100).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-ci CI: run the baseline test suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant