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

This commit is contained in:
Xiaoyu Zhang
2026-07-29 17:25:00 +08:00
committed by GitHub
parent 1b9dfa14e6
commit c32c4ef79c
370 changed files with 300 additions and 269 deletions
@@ -164,7 +164,7 @@ Users listed in [CI_PERMISSIONS.json](https://github.com/sgl-project/sglang/blob
## How to update sgl-kernel
Since sglang and the `sglang-kernel` (prior `sgl-kernel`) distribution are separate Python packages, our current GitHub CI infrastructure does not support updating a kernel and using it immediately within the same pull request (PR).
To add a new kernel or modify an existing one in the `sgl-kernel/` source tree, you must use multiple PRs.
To add a new kernel or modify an existing one in the `python/sglang/kernels/aot/` source tree, you must use multiple PRs.
Follow these steps:
+2 -2
View File
@@ -50,11 +50,11 @@ cd sglang
# Compile sgl-kernel
pip install --upgrade pip
cd sgl-kernel
cd python/sglang/kernels/aot
python setup_rocm.py install
# Install sglang python package along with diffusion support
cd ..
cd ../../../..
rm -rf python/pyproject.toml && mv python/pyproject_other.toml python/pyproject.toml
pip install -e "python[all_hip]"
```
@@ -36,7 +36,7 @@ source sglang-metal/bin/activate
# (Optional) Compile sgl-kernel
uv pip install --upgrade pip
uv run sgl-kernel/setup_metal.py install
uv run python/sglang/kernels/aot/setup_metal.py install
# Install sglang python package along with diffusion support
rm -f python/pyproject.toml && mv python/pyproject_other.toml python/pyproject.toml
@@ -126,7 +126,7 @@ uv pip install --upgrade pip setuptools
uv pip install .
# Build the CPU backend kernels
cd ../sgl-kernel
cd sglang/kernels/aot
cp pyproject_cpu.toml pyproject.toml
uv pip install .
```
@@ -19,11 +19,11 @@ cd sglang
# Compile sgl-kernel
pip install --upgrade pip
cd sgl-kernel
cd python/sglang/kernels/aot
python setup_musa.py install
# Install sglang python package along with diffusion support
cd ..
cd ../../../..
rm -f python/pyproject.toml && mv python/pyproject_other.toml python/pyproject.toml
pip install -e "python[all_musa]"
```