Skip to content

[Kernel] Move sgl-kernel under sglang.kernels.aot - #32648

Merged
BBuf merged 12 commits into
mainfrom
bbuf/relocate-sgl-kernel-to-aot
Jul 29, 2026
Merged

BBuf merged 12 commits into
mainfrom
bbuf/relocate-sgl-kernel-to-aot

Conversation

@BBuf

@BBuf BBuf commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Move the standalone sgl-kernel source tree to python/sglang/kernels/aot so SGLang's AOT and JIT kernel implementations live under one kernel namespace.
  • Preserve the published distribution name (sglang-kernel), Python import (sgl_kernel), operator registrations, versioning, API, and ABI.
  • Update CUDA/ROCm/CPU/ARM build, test, release, Docker, CI, CODEOWNERS, labeler, and developer paths to the new source location.
  • Keep the nested AOT project out of the main sglang wheel and sdist, and preserve the previous main/JIT/AOT change-detection boundaries.
  • Update the existing clang-format symlink that referenced the old top-level directory.

This is a follow-up to the kernel layout work tracked in #29630.

Validation

  • pre-commit run --all-files
  • Main SGLang wheel and sdist built locally; both verified to exclude sglang/kernels/aot
  • AOT source distribution built locally and verified to contain the sgl_kernel package and C++/CUDA sources
  • Workflow YAML, TOML, Python AST/compile, shell syntax, version consistency, path-filter matrix, and residual old-path scans
  • Full CUDA 13 AOT wheel build from python/sglang/kernels/aot on NVIDIA H200
  • Installed wheel metadata/import check: sglang-kernel==0.4.5, import sgl_kernel, H200 SM90
  • H200 GPU tests: 1287 passed across test_activation.py, test_norm.py, and test_topk.py

Compatibility

Only the repository source location changes. Package names, imports, runtime APIs, operators, and release artifact naming remain unchanged.


CI States

Latest PR Test (Base): 🚫 Run #30367764295
Latest PR Test (Extra): ❌ Run #30367762885

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@github-actions github-actions Bot added documentation Improvements or additions to documentation quant LLM Quantization amd dependencies Pull requests that update a dependency file Multi-modal multi-modal language model deepseek speculative-decoding npu mthreads apple-silicon jit-kernel labels Jul 28, 2026
@mintlify

mintlify Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
lmsysorg 🟢 Ready View Preview Jul 28, 2026, 11:36 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@BBuf
BBuf marked this pull request as ready for review July 28, 2026 11:44
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@BBuf
BBuf requested review from ispobock and yeahdongcn as code owners July 28, 2026 11:44
@BBuf
BBuf merged commit c32c4ef into main Jul 29, 2026
211 of 249 checks passed
@BBuf
BBuf deleted the bbuf/relocate-sgl-kernel-to-aot branch July 29, 2026 09:25
adityavaid pushed a commit to adityavaid/sglang that referenced this pull request Jul 29, 2026
jinzhenfan pushed a commit to jinzhenfan/sglang that referenced this pull request Jul 29, 2026
chuyeh added a commit to chuyeh/sglang that referenced this pull request Aug 3, 2026
Carry the upstream changes that landed since the last sync into the ROCm 7.2.4
files, which do not inherit them because they are separate copies:

- Bump the two rocm724 stages to AITER d9e5ef7, matching the four existing
  flavors. They were the only stages left on 9127c94.
- Regenerate pr-test-amd-rocm724.yml from the current pr-test-amd-rocm720.yml
  so it picks up the MI325 -> MI300 runner migration (sgl-project#31409), the sgl-kernel
  move to python/sglang/kernels/aot (sgl-project#32648), and the DSV4 MoE weight-loading
  env (sgl-project#32315), along with the max-parallel limits and timeout increases that
  came with them.

The MI325 labels and the sgl-kernel test paths were the load-bearing ones: the
former no longer resolve to a runner pool, and the latter point at a directory
that no longer exists.

Co-authored-by: Cursor <cursoragent@cursor.com>
HanHan009527 added a commit to bytedance-iaas/sglang that referenced this pull request Aug 14, 2026
The nightly builds deepseek_v4 source but reused ep_main's
release-whl-kernel.yml, coupling that shared file to deepseek_v4's
directory layout. ep_main follows upstream (kernels under
python/sglang/kernels/aot/, per sgl-project#32648) while deepseek_v4 keeps them
under sgl-kernel/, so one shared file cannot serve both.

Split the two consumers:

- Nightly now calls the kernel workflow from the branch it builds:
  uses: .../release-whl-kernel.yml@bytedance/deepseek_v4 (which now
  exposes a workflow_call build-wheel job using sgl-kernel/).
- ep_main's release-whl-kernel.yml is reverted to python/sglang/kernels/aot,
  undoing the earlier sgl-kernel path change (31bf244). Its only local
  consumer, release-docker-dev.yml, builds ep_main source, which uses the
  upstream python/sglang/kernels/aot/ layout.

Each branch's kernel build now tracks its own source structure.

Co-authored-by: TRAE CLI <noreply@bytedance.com>
saturn-acc pushed a commit to saturn-acc/sglang that referenced this pull request Aug 16, 2026
jakki-amd pushed a commit to jakki-amd/sglang that referenced this pull request Sep 9, 2026
Atituiset pushed a commit to Atituiset/sglang that referenced this pull request Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

amd apple-silicon deepseek dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation jit-kernel mthreads Multi-modal multi-modal language model npu quant LLM Quantization run-ci sgl-kernel speculative-decoding

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant