Repository navigation
[CI] flash-mla: Add the sgl-flash-mla release workflow - #45402
Closed
DarkSharpness wants to merge 1 commit into
Closed
DarkSharpness wants to merge 1 commit into
DarkSharpness wants to merge 1 commit into
Conversation
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)
DarkSharpness
requested review from
Fridge003,
HaiShaw,
Kangyan-Zhou,
bingxche,
ishandhanani,
ispobock,
merrymercy,
sogalin and
yctseng0211
as code owners
October 20, 2026 14:14
This comment has been minimized.
This comment has been minimized.
Collaborator
Author
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). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.tomldependency. Those come later, separately.Paired with sgl-project/FlashMLA#19, which does the packaging on the other side (distribution name,
VERSIONfile, metadata). The intended order is: merge that one, register the PyPI project, then merge this.Files
docker/sgl-flash-mla.Dockerfilescripts/build_sgl_flash_mla.shscripts/rename_sgl_flash_mla_whl.shlinux_<arch>->manylinux2014_<arch>, add+cu130scripts/update_flashmla_whl_index.pysgl-whl/cu130/sgl-flash-mla/.github/workflows/release-whl-flashmla.ymlModelled 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:Both register through
STABLE_TORCH_LIBRARYduring static initialisation and are loaded withtorch.ops.load_library, not imported, so neither definesPyInit_*. One wheel per architecture serves CPython 3.10+.Built with CUDA 13.4, published as
+cu130. The kernels need nvcc >= 13.1 forcvtwith.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 linklibcudart.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:
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_TOKENrepository secret, and thesgl-flash-mlaproject registered on PyPI.GH_PAT_FOR_WHL_RELEASEalready 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.