".github/vscode:/vscode.git/clone" did not exist on "a00c735d9f69555331c463c564a7a40d0bed73b5"
Unverified Commit a0f844ed authored by fzyzcjy's avatar fzyzcjy Committed by GitHub
Browse files

Let sgl-kernel changes be tested on srt (#10313)

parent 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
...@@ -21,6 +21,182 @@ concurrency: ...@@ -21,6 +21,182 @@ concurrency:
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
# =============================================== sgl-kernel ====================================================
sgl-kernel-check-changes:
runs-on: ubuntu-latest
outputs:
src: ${{ steps.filter.outputs.src }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Detect file changes
id: filter
uses: dorny/paths-filter@v3
with:
filters: |
src:
- "sgl-kernel/**"
sgl-kernel-lint:
runs-on: ubuntu-latest
needs: sgl-kernel-check-changes
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
github.event.pull_request.draft == false &&
needs.sgl-kernel-check-changes.outputs.src == 'true'
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
sgl-kernel-build-wheels:
needs: sgl-kernel-check-changes
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
github.event.pull_request.draft == false &&
needs.sgl-kernel-check-changes.outputs.src == 'true'
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/*
sgl-kernel-unit-test:
needs: [sgl-kernel-check-changes, sgl-kernel-build-wheels]
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
github.event.pull_request.draft == false &&
needs.sgl-kernel-check-changes.outputs.src == 'true'
runs-on: 1-gpu-runner
steps:
- uses: actions/checkout@v4
- name: Cleanup
run: |
ls -alh sgl-kernel/dist || true
rm -rf sgl-kernel/dist/* || true
- 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
sgl-kernel-mla-test:
needs: [sgl-kernel-check-changes, sgl-kernel-build-wheels]
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
github.event.pull_request.draft == false &&
needs.sgl-kernel-check-changes.outputs.src == 'true'
runs-on: 1-gpu-runner
steps:
- uses: actions/checkout@v4
- name: Cleanup
run: |
ls -alh sgl-kernel/dist || true
rm -rf sgl-kernel/dist/* || true
- 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
sgl-kernel-finish:
needs: [sgl-kernel-unit-test, sgl-kernel-mla-test, sgl-kernel-lint, sgl-kernel-build-wheels]
if: always()
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
# =============================================== primary ====================================================
check-changes: check-changes:
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs: outputs:
...@@ -39,9 +215,10 @@ jobs: ...@@ -39,9 +215,10 @@ jobs:
- "scripts/ci/**" - "scripts/ci/**"
- "test/**" - "test/**"
- ".github/workflows/pr-test.yml" - ".github/workflows/pr-test.yml"
- "sgl-kernel/**"
unit-test-frontend: unit-test-frontend:
needs: check-changes needs: [check-changes, sgl-kernel-check-changes, sgl-kernel-finish]
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
github.event.pull_request.draft == false && github.event.pull_request.draft == false &&
needs.check-changes.outputs.src == 'true' needs.check-changes.outputs.src == 'true'
...@@ -50,9 +227,17 @@ jobs: ...@@ -50,9 +227,17 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Download artifacts
if: needs.check-changes.outputs.src == 'true'
uses: actions/download-artifact@v4
with:
path: sgl-kernel/dist/
merge-multiple: true
pattern: wheel-python3.10-cuda12.4
- name: Install dependencies - name: Install dependencies
run: | run: |
bash scripts/ci/ci_install_dependency.sh CUSTOM_BUILD_SGL_KERNEL=${{needs.sgl-kernel-check-changes.outputs.src}} bash scripts/ci/ci_install_dependency.sh
- name: Run test - name: Run test
timeout-minutes: 10 timeout-minutes: 10
...@@ -61,7 +246,7 @@ jobs: ...@@ -61,7 +246,7 @@ jobs:
python3 run_suite.py --suite per-commit python3 run_suite.py --suite per-commit
unit-test-backend-1-gpu: unit-test-backend-1-gpu:
needs: [check-changes, unit-test-frontend] needs: [check-changes, unit-test-frontend, sgl-kernel-check-changes, sgl-kernel-finish]
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
github.event.pull_request.draft == false && github.event.pull_request.draft == false &&
needs.check-changes.outputs.src == 'true' needs.check-changes.outputs.src == 'true'
...@@ -74,9 +259,17 @@ jobs: ...@@ -74,9 +259,17 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Download artifacts
if: needs.check-changes.outputs.src == 'true'
uses: actions/download-artifact@v4
with:
path: sgl-kernel/dist/
merge-multiple: true
pattern: wheel-python3.10-cuda12.4
- name: Install dependencies - name: Install dependencies
run: | run: |
bash scripts/ci/ci_install_dependency.sh CUSTOM_BUILD_SGL_KERNEL=${{needs.sgl-kernel-check-changes.outputs.src}} bash scripts/ci/ci_install_dependency.sh
- name: Run test - name: Run test
timeout-minutes: 30 timeout-minutes: 30
...@@ -85,7 +278,7 @@ jobs: ...@@ -85,7 +278,7 @@ jobs:
python3 run_suite.py --suite per-commit --auto-partition-id ${{ matrix.part }} --auto-partition-size 10 python3 run_suite.py --suite per-commit --auto-partition-id ${{ matrix.part }} --auto-partition-size 10
unit-test-backend-2-gpu: unit-test-backend-2-gpu:
needs: [check-changes] needs: [check-changes, sgl-kernel-check-changes, sgl-kernel-finish]
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
github.event.pull_request.draft == false && github.event.pull_request.draft == false &&
needs.check-changes.outputs.src == 'true' needs.check-changes.outputs.src == 'true'
...@@ -98,9 +291,17 @@ jobs: ...@@ -98,9 +291,17 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Download artifacts
if: needs.check-changes.outputs.src == 'true'
uses: actions/download-artifact@v4
with:
path: sgl-kernel/dist/
merge-multiple: true
pattern: wheel-python3.10-cuda12.4
- name: Install dependencies - name: Install dependencies
run: | run: |
bash scripts/ci/ci_install_dependency.sh CUSTOM_BUILD_SGL_KERNEL=${{needs.sgl-kernel-check-changes.outputs.src}} bash scripts/ci/ci_install_dependency.sh
- name: Run test - name: Run test
timeout-minutes: 30 timeout-minutes: 30
...@@ -109,7 +310,7 @@ jobs: ...@@ -109,7 +310,7 @@ jobs:
python3 run_suite.py --suite per-commit-2-gpu --auto-partition-id ${{ matrix.part }} --auto-partition-size 2 python3 run_suite.py --suite per-commit-2-gpu --auto-partition-id ${{ matrix.part }} --auto-partition-size 2
unit-test-backend-4-gpu: unit-test-backend-4-gpu:
needs: [check-changes, unit-test-backend-2-gpu] needs: [check-changes, unit-test-backend-2-gpu, sgl-kernel-check-changes, sgl-kernel-finish]
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
github.event.pull_request.draft == false && github.event.pull_request.draft == false &&
needs.check-changes.outputs.src == 'true' needs.check-changes.outputs.src == 'true'
...@@ -122,9 +323,17 @@ jobs: ...@@ -122,9 +323,17 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Download artifacts
if: needs.check-changes.outputs.src == 'true'
uses: actions/download-artifact@v4
with:
path: sgl-kernel/dist/
merge-multiple: true
pattern: wheel-python3.10-cuda12.4
- name: Install dependencies - name: Install dependencies
run: | run: |
bash scripts/ci/ci_install_dependency.sh CUSTOM_BUILD_SGL_KERNEL=${{needs.sgl-kernel-check-changes.outputs.src}} bash scripts/ci/ci_install_dependency.sh
- name: Run test - name: Run test
timeout-minutes: 20 timeout-minutes: 20
...@@ -133,7 +342,7 @@ jobs: ...@@ -133,7 +342,7 @@ jobs:
python3 run_suite.py --suite per-commit-4-gpu --auto-partition-id ${{ matrix.part }} --auto-partition-size 2 python3 run_suite.py --suite per-commit-4-gpu --auto-partition-id ${{ matrix.part }} --auto-partition-size 2
unit-test-backend-8-gpu: unit-test-backend-8-gpu:
needs: [check-changes, unit-test-backend-2-gpu] needs: [check-changes, unit-test-backend-2-gpu, sgl-kernel-check-changes, sgl-kernel-finish]
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
github.event.pull_request.draft == false && github.event.pull_request.draft == false &&
needs.check-changes.outputs.src == 'true' needs.check-changes.outputs.src == 'true'
...@@ -146,9 +355,17 @@ jobs: ...@@ -146,9 +355,17 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Download artifacts
if: needs.check-changes.outputs.src == 'true'
uses: actions/download-artifact@v4
with:
path: sgl-kernel/dist/
merge-multiple: true
pattern: wheel-python3.10-cuda12.4
- name: Install dependencies - name: Install dependencies
run: | run: |
bash scripts/ci/ci_install_dependency.sh CUSTOM_BUILD_SGL_KERNEL=${{needs.sgl-kernel-check-changes.outputs.src}} bash scripts/ci/ci_install_dependency.sh
- name: Run test - name: Run test
timeout-minutes: 20 timeout-minutes: 20
...@@ -157,7 +374,7 @@ jobs: ...@@ -157,7 +374,7 @@ jobs:
python3 run_suite.py --suite per-commit-8-gpu --auto-partition-id ${{ matrix.part }} --auto-partition-size 2 python3 run_suite.py --suite per-commit-8-gpu --auto-partition-id ${{ matrix.part }} --auto-partition-size 2
performance-test-1-gpu-part-1: performance-test-1-gpu-part-1:
needs: check-changes needs: [check-changes, sgl-kernel-check-changes, sgl-kernel-finish]
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
github.event.pull_request.draft == false && github.event.pull_request.draft == false &&
needs.check-changes.outputs.src == 'true' needs.check-changes.outputs.src == 'true'
...@@ -166,9 +383,17 @@ jobs: ...@@ -166,9 +383,17 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Download artifacts
if: needs.check-changes.outputs.src == 'true'
uses: actions/download-artifact@v4
with:
path: sgl-kernel/dist/
merge-multiple: true
pattern: wheel-python3.10-cuda12.4
- name: Install dependencies - name: Install dependencies
run: | run: |
bash scripts/ci/ci_install_dependency.sh CUSTOM_BUILD_SGL_KERNEL=${{needs.sgl-kernel-check-changes.outputs.src}} bash scripts/ci/ci_install_dependency.sh
- name: Benchmark single latency - name: Benchmark single latency
timeout-minutes: 10 timeout-minutes: 10
...@@ -209,7 +434,7 @@ jobs: ...@@ -209,7 +434,7 @@ jobs:
python3 -m unittest test_bench_serving.TestBenchServing.test_lora_online_latency_with_concurrent_adapter_updates python3 -m unittest test_bench_serving.TestBenchServing.test_lora_online_latency_with_concurrent_adapter_updates
performance-test-1-gpu-part-2: performance-test-1-gpu-part-2:
needs: check-changes needs: [check-changes, sgl-kernel-check-changes, sgl-kernel-finish]
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
github.event.pull_request.draft == false && github.event.pull_request.draft == false &&
needs.check-changes.outputs.src == 'true' needs.check-changes.outputs.src == 'true'
...@@ -218,9 +443,17 @@ jobs: ...@@ -218,9 +443,17 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Download artifacts
if: needs.check-changes.outputs.src == 'true'
uses: actions/download-artifact@v4
with:
path: sgl-kernel/dist/
merge-multiple: true
pattern: wheel-python3.10-cuda12.4
- name: Install dependencies - name: Install dependencies
run: | run: |
bash scripts/ci/ci_install_dependency.sh CUSTOM_BUILD_SGL_KERNEL=${{needs.sgl-kernel-check-changes.outputs.src}} bash scripts/ci/ci_install_dependency.sh
- name: Benchmark offline throughput (w/o RadixAttention) - name: Benchmark offline throughput (w/o RadixAttention)
timeout-minutes: 10 timeout-minutes: 10
...@@ -253,7 +486,7 @@ jobs: ...@@ -253,7 +486,7 @@ jobs:
python3 -m unittest test_bench_serving.TestBenchServing.test_vlm_online_latency python3 -m unittest test_bench_serving.TestBenchServing.test_vlm_online_latency
performance-test-2-gpu: performance-test-2-gpu:
needs: [check-changes, unit-test-backend-2-gpu] needs: [check-changes, unit-test-backend-2-gpu, sgl-kernel-check-changes, sgl-kernel-finish]
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
github.event.pull_request.draft == false && github.event.pull_request.draft == false &&
needs.check-changes.outputs.src == 'true' needs.check-changes.outputs.src == 'true'
...@@ -262,9 +495,17 @@ jobs: ...@@ -262,9 +495,17 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Download artifacts
if: needs.check-changes.outputs.src == 'true'
uses: actions/download-artifact@v4
with:
path: sgl-kernel/dist/
merge-multiple: true
pattern: wheel-python3.10-cuda12.4
- name: Install dependencies - name: Install dependencies
run: | run: |
bash scripts/ci/ci_install_dependency.sh CUSTOM_BUILD_SGL_KERNEL=${{needs.sgl-kernel-check-changes.outputs.src}} bash scripts/ci/ci_install_dependency.sh
- name: Benchmark single latency (TP=2) - name: Benchmark single latency (TP=2)
timeout-minutes: 10 timeout-minutes: 10
...@@ -303,7 +544,7 @@ jobs: ...@@ -303,7 +544,7 @@ jobs:
python3 -m unittest test_bench_serving.TestBenchServing.test_pp_long_context_prefill python3 -m unittest test_bench_serving.TestBenchServing.test_pp_long_context_prefill
accuracy-test-1-gpu: accuracy-test-1-gpu:
needs: check-changes needs: [check-changes, sgl-kernel-check-changes, sgl-kernel-finish]
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
github.event.pull_request.draft == false && github.event.pull_request.draft == false &&
needs.check-changes.outputs.src == 'true' needs.check-changes.outputs.src == 'true'
...@@ -312,9 +553,17 @@ jobs: ...@@ -312,9 +553,17 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Download artifacts
if: needs.check-changes.outputs.src == 'true'
uses: actions/download-artifact@v4
with:
path: sgl-kernel/dist/
merge-multiple: true
pattern: wheel-python3.10-cuda12.4
- name: Install dependencies - name: Install dependencies
run: | run: |
bash scripts/ci/ci_install_dependency.sh CUSTOM_BUILD_SGL_KERNEL=${{needs.sgl-kernel-check-changes.outputs.src}} bash scripts/ci/ci_install_dependency.sh
git clone https://github.com/merrymercy/human-eval.git git clone https://github.com/merrymercy/human-eval.git
cd human-eval cd human-eval
pip install -e . pip install -e .
...@@ -326,7 +575,7 @@ jobs: ...@@ -326,7 +575,7 @@ jobs:
python3 test_eval_accuracy_large.py python3 test_eval_accuracy_large.py
accuracy-test-2-gpu: accuracy-test-2-gpu:
needs: [check-changes, accuracy-test-1-gpu] needs: [check-changes, accuracy-test-1-gpu, sgl-kernel-check-changes, sgl-kernel-finish]
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
github.event.pull_request.draft == false && github.event.pull_request.draft == false &&
needs.check-changes.outputs.src == 'true' needs.check-changes.outputs.src == 'true'
...@@ -335,9 +584,17 @@ jobs: ...@@ -335,9 +584,17 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Download artifacts
if: needs.check-changes.outputs.src == 'true'
uses: actions/download-artifact@v4
with:
path: sgl-kernel/dist/
merge-multiple: true
pattern: wheel-python3.10-cuda12.4
- name: Install dependencies - name: Install dependencies
run: | run: |
bash scripts/ci/ci_install_dependency.sh CUSTOM_BUILD_SGL_KERNEL=${{needs.sgl-kernel-check-changes.outputs.src}} bash scripts/ci/ci_install_dependency.sh
git clone https://github.com/merrymercy/human-eval.git git clone https://github.com/merrymercy/human-eval.git
cd human-eval cd human-eval
pip install -e . pip install -e .
...@@ -349,7 +606,7 @@ jobs: ...@@ -349,7 +606,7 @@ jobs:
python3 test_moe_eval_accuracy_large.py python3 test_moe_eval_accuracy_large.py
unit-test-deepep-4-gpu: unit-test-deepep-4-gpu:
needs: [check-changes, unit-test-backend-2-gpu] needs: [check-changes, unit-test-backend-2-gpu, sgl-kernel-check-changes, sgl-kernel-finish]
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
github.event.pull_request.draft == false && github.event.pull_request.draft == false &&
needs.check-changes.outputs.src == 'true' needs.check-changes.outputs.src == 'true'
...@@ -358,9 +615,17 @@ jobs: ...@@ -358,9 +615,17 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Download artifacts
if: needs.check-changes.outputs.src == 'true'
uses: actions/download-artifact@v4
with:
path: sgl-kernel/dist/
merge-multiple: true
pattern: wheel-python3.10-cuda12.4
- name: Install dependencies - name: Install dependencies
run: | run: |
bash scripts/ci/ci_install_deepep.sh CUSTOM_BUILD_SGL_KERNEL=${{needs.sgl-kernel-check-changes.outputs.src}} bash scripts/ci/ci_install_deepep.sh
- name: Run test - name: Run test
timeout-minutes: 20 timeout-minutes: 20
...@@ -369,7 +634,7 @@ jobs: ...@@ -369,7 +634,7 @@ jobs:
python3 run_suite.py --suite per-commit-4-gpu-deepep python3 run_suite.py --suite per-commit-4-gpu-deepep
unit-test-deepep-8-gpu: unit-test-deepep-8-gpu:
needs: [check-changes, unit-test-backend-2-gpu] needs: [check-changes, unit-test-backend-2-gpu, sgl-kernel-check-changes, sgl-kernel-finish]
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
github.event.pull_request.draft == false && github.event.pull_request.draft == false &&
needs.check-changes.outputs.src == 'true' needs.check-changes.outputs.src == 'true'
...@@ -378,9 +643,17 @@ jobs: ...@@ -378,9 +643,17 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Download artifacts
if: needs.check-changes.outputs.src == 'true'
uses: actions/download-artifact@v4
with:
path: sgl-kernel/dist/
merge-multiple: true
pattern: wheel-python3.10-cuda12.4
- name: Install dependencies - name: Install dependencies
run: | run: |
bash scripts/ci/ci_install_deepep.sh CUSTOM_BUILD_SGL_KERNEL=${{needs.sgl-kernel-check-changes.outputs.src}} bash scripts/ci/ci_install_deepep.sh
- name: Run test - name: Run test
timeout-minutes: 20 timeout-minutes: 20
...@@ -389,7 +662,7 @@ jobs: ...@@ -389,7 +662,7 @@ jobs:
python3 run_suite.py --suite per-commit-8-gpu-deepep python3 run_suite.py --suite per-commit-8-gpu-deepep
unit-test-backend-8-gpu-b200: unit-test-backend-8-gpu-b200:
needs: [check-changes, unit-test-backend-2-gpu] needs: [check-changes, unit-test-backend-2-gpu, sgl-kernel-check-changes, sgl-kernel-finish]
if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') && if: (github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request') &&
github.event.pull_request.draft == false && github.event.pull_request.draft == false &&
needs.check-changes.outputs.src == 'true' needs.check-changes.outputs.src == 'true'
...@@ -400,9 +673,17 @@ jobs: ...@@ -400,9 +673,17 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Download artifacts
if: needs.check-changes.outputs.src == 'true'
uses: actions/download-artifact@v4
with:
path: sgl-kernel/dist/
merge-multiple: true
pattern: wheel-python3.10-cuda12.8
- name: Install dependencies - name: Install dependencies
run: | run: |
IS_BLACKWELL=1 bash scripts/ci/ci_install_dependency.sh CUSTOM_BUILD_SGL_KERNEL=${{needs.sgl-kernel-check-changes.outputs.src}} IS_BLACKWELL=1 bash scripts/ci/ci_install_dependency.sh
- name: Run test - name: Run test
timeout-minutes: 60 timeout-minutes: 60
......
...@@ -53,9 +53,16 @@ SGL_KERNEL_VERSION_FROM_SRT=$(grep -Po -m1 '(?<=sgl-kernel==)[0-9A-Za-z\.\-]+' p ...@@ -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}" 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 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 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 fi
# Show current packages # Show current packages
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment