Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
a0f844ed
Unverified
Commit
a0f844ed
authored
Sep 14, 2025
by
fzyzcjy
Committed by
GitHub
Sep 14, 2025
Browse files
Let sgl-kernel changes be tested on srt (#10313)
parent
2df532ef
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
316 additions
and
179 deletions
+316
-179
.github/workflows/pr-test-sgl-kernel.yml
.github/workflows/pr-test-sgl-kernel.yml
+0
-151
.github/workflows/pr-test.yml
.github/workflows/pr-test.yml
+307
-26
scripts/ci/ci_install_dependency.sh
scripts/ci/ci_install_dependency.sh
+9
-2
No files found.
.github/workflows/pr-test-sgl-kernel.yml
deleted
100644 → 0
View file @
2df532ef
name
:
PR Test (sgl-kernel)
on
:
push
:
branches
:
[
main
]
paths
:
-
"
sgl-kernel/**"
pull_request
:
branches
:
[
main
]
paths
:
-
"
sgl-kernel/**"
workflow_dispatch
:
concurrency
:
group
:
pr-test-sgl-kernel-${{ github.ref }}
cancel-in-progress
:
true
jobs
:
lint
:
runs-on
:
ubuntu-latest
steps
:
-
name
:
Checkout code
uses
:
actions/checkout@v4
-
name
:
Check clang-format
uses
:
DoozyX/clang-format-lint-action@v0.18.1
with
:
source
:
sgl-kernel
extensions
:
h,c,cpp,hpp,cu,cuh,cc
clangFormatVersion
:
18
style
:
file
build-wheels
:
if
:
github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request'
runs-on
:
sgl-kernel-build-node
strategy
:
matrix
:
include
:
-
python-version
:
"
3.10"
cuda-version
:
"
12.4"
-
python-version
:
"
3.10"
cuda-version
:
"
12.8"
-
python-version
:
"
3.10"
cuda-version
:
"
12.9"
name
:
Build Wheel (CUDA ${{ matrix.cuda-version }})
steps
:
-
name
:
Cleanup
run
:
|
sudo rm -rf $GITHUB_WORKSPACE/* || true
-
uses
:
actions/checkout@v4
with
:
submodules
:
"
recursive"
-
name
:
Set up Python ${{ matrix.python-version }}
uses
:
actions/setup-python@v5
with
:
python-version
:
${{ matrix.python-version }}
-
name
:
Build wheel for Python ${{ matrix.python-version }} and CUDA ${{ matrix.cuda-version }}
if
:
github.event_name != 'push' || (matrix.cuda-version != '12.4' && matrix.cuda-version != '12.8')
run
:
|
cd sgl-kernel
chmod +x ./build.sh
./build.sh "${{ matrix.python-version }}" "${{ matrix.cuda-version }}"
-
name
:
Upload artifacts
uses
:
actions/upload-artifact@v4
with
:
name
:
wheel-python${{ matrix.python-version }}-cuda${{ matrix.cuda-version }}
path
:
sgl-kernel/dist/*
unit-test
:
if
:
github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request'
needs
:
build-wheels
runs-on
:
1-gpu-runner
steps
:
-
uses
:
actions/checkout@v4
-
name
:
Download artifacts
uses
:
actions/download-artifact@v4
with
:
path
:
sgl-kernel/dist/
merge-multiple
:
true
pattern
:
wheel-python3.10-cuda12.9
-
name
:
Install
run
:
|
bash scripts/ci/ci_install_dependency.sh
pip3 install torch==2.8.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/test/cu126 && pip3 install pytest
pip3 uninstall sgl-kernel -y || true
pip3 install sgl-kernel/dist/*whl --force-reinstall --no-deps
pip3 list | grep sgl-kernel
-
name
:
Run test
timeout-minutes
:
30
run
:
|
cd sgl-kernel
pytest tests/
-
name
:
Uninstall dependencies
run
:
|
pip3 uninstall sgl-kernel -y
mla-test
:
if
:
github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request'
needs
:
build-wheels
runs-on
:
1-gpu-runner
steps
:
-
uses
:
actions/checkout@v4
-
name
:
Download artifacts
uses
:
actions/download-artifact@v4
with
:
path
:
sgl-kernel/dist/
merge-multiple
:
true
pattern
:
wheel-python3.10-cuda12.9
-
name
:
Install
run
:
|
bash scripts/ci/ci_install_dependency.sh
pip3 install torch==2.8.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/test/cu126
pip3 uninstall sgl-kernel -y || true
pip3 install sgl-kernel/dist/*whl --force-reinstall --no-deps
pip3 list | grep sgl-kernel
-
name
:
Run test
timeout-minutes
:
30
run
:
|
cd test/srt
python3 test_mla_deepseek_v3.py
-
name
:
Uninstall dependencies
run
:
|
pip3 uninstall sgl-kernel -y
finish
:
needs
:
[
unit-test
,
mla-test
,
lint
,
build-wheels
]
runs-on
:
ubuntu-latest
steps
:
-
name
:
Check all dependent job statuses
run
:
|
results=(${{ join(needs.*.result, ' ') }})
for result in "${results[@]}"; do
if [ "$result" = "failure" ] || [ "$result" = "cancelled" ]; then
echo "Job failed with result: $result"
exit 1
fi
done
echo "All jobs completed successfully"
exit 0
.github/workflows/pr-test.yml
View file @
a0f844ed
This diff is collapsed.
Click to expand it.
scripts/ci/ci_install_dependency.sh
View file @
a0f844ed
...
...
@@ -53,9 +53,16 @@ SGL_KERNEL_VERSION_FROM_SRT=$(grep -Po -m1 '(?<=sgl-kernel==)[0-9A-Za-z\.\-]+' p
echo
"SGL_KERNEL_VERSION_FROM_KERNEL=
${
SGL_KERNEL_VERSION_FROM_KERNEL
}
SGL_KERNEL_VERSION_FROM_SRT=
${
SGL_KERNEL_VERSION_FROM_SRT
}
"
if
[
"
$IS_BLACKWELL
"
=
"1"
]
;
then
$PIP_CMD
install
https://github.com/sgl-project/whl/releases/download/v
${
SGL_KERNEL_VERSION_FROM_SRT
}
/sgl_kernel-
${
SGL_KERNEL_VERSION_FROM_SRT
}
+cu128-cp310-abi3-manylinux2014_x86_64.whl
--force-reinstall
$PIP_INSTALL_SUFFIX
SGL_KERNEL_CUDA_VERSION
=
cu128
else
$PIP_CMD
install
https://github.com/sgl-project/whl/releases/download/v
${
SGL_KERNEL_VERSION_FROM_SRT
}
/sgl_kernel-
${
SGL_KERNEL_VERSION_FROM_SRT
}
+cu124-cp310-abi3-manylinux2014_x86_64.whl
--force-reinstall
$PIP_INSTALL_SUFFIX
SGL_KERNEL_CUDA_VERSION
=
cu124
fi
if
[
"
${
CUSTOM_BUILD_SGL_KERNEL
:-}
"
=
"true"
]
;
then
ls
-alh
sgl-kernel/dist
$PIP_CMD
install
sgl-kernel/dist/sgl_kernel-
${
SGL_KERNEL_VERSION_FROM_KERNEL
}
+
${
SGL_KERNEL_CUDA_VERSION
}
-cp310-abi3-manylinux2014_x86_64
.whl
--force-reinstall
$PIP_INSTALL_SUFFIX
else
$PIP_CMD
install
https://github.com/sgl-project/whl/releases/download/v
${
SGL_KERNEL_VERSION_FROM_SRT
}
/sgl_kernel-
${
SGL_KERNEL_VERSION_FROM_SRT
}
+
${
SGL_KERNEL_CUDA_VERSION
}
-cp310-abi3-manylinux2014_x86_64
.whl
--force-reinstall
$PIP_INSTALL_SUFFIX
fi
# Show current packages
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment