-
Notifications
You must be signed in to change notification settings - Fork 805
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/sgl-project/sglang, fix sho…
…rtfin backend streaming
- Loading branch information
Showing
517 changed files
with
48,682 additions
and
7,617 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sgl-kernel/3rdparty/tensorrt_llm/* |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
From lmsysorg/sglang:dev | ||
|
||
# Create non-root user with specified UID and GID | ||
# NOTE: Replace with your own UID and GID. This is a workaround from https://github.com/microsoft/vscode-remote-release/issues/49#issuecomment-489060908. | ||
ARG HOST_UID=1003 | ||
ARG HOST_GID=1003 | ||
RUN groupadd -g $HOST_GID devuser && \ | ||
useradd -m -u $HOST_UID -g $HOST_GID -s /bin/zsh devuser | ||
|
||
# Give devuser sudo access | ||
RUN apt-get update && apt-get install -y sudo && \ | ||
echo "devuser ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/devuser && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
apt-get clean | ||
|
||
# Set up oh-my-zsh for devuser | ||
RUN cp -r /root/.oh-my-zsh /home/devuser/.oh-my-zsh && \ | ||
cp /root/.zshrc /home/devuser/.zshrc && \ | ||
cp /root/.vimrc /home/devuser/.vimrc && \ | ||
cp /root/.tmux.conf /home/devuser/.tmux.conf && \ | ||
sed -i 's|/root/.oh-my-zsh|/home/devuser/.oh-my-zsh|g' /home/devuser/.zshrc && \ | ||
chown -R devuser:devuser /home/devuser/ | ||
|
||
# Set workspace directory and ownership | ||
WORKDIR /sgl-workspace/sglang | ||
RUN chown -R devuser:devuser /sgl-workspace | ||
|
||
# Switch to devuser | ||
USER devuser | ||
|
||
# Install uv | ||
RUN curl -LsSf https://astral.sh/uv/install.sh | sh | ||
|
||
# Install rust | ||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"name": "sglang", | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
}, | ||
"remoteUser": "devuser", | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
// Python development | ||
"ms-python.python", | ||
"charliermarsh.ruff", | ||
// Rust development | ||
"rust-lang.rust-analyzer", | ||
"tamasfe.even-better-toml" | ||
] | ||
} | ||
}, | ||
"forwardPorts": [], | ||
"runArgs": [ | ||
"--gpus", | ||
"all" | ||
] | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Experiment Runner | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
script: | ||
description: "Experiment Runner Script" | ||
default: "configs/sharegpt_config.yaml" | ||
|
||
concurrency: | ||
group: experiment-runner-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
experiment-runner-1-gpu: | ||
if: github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request' | ||
runs-on: 1-gpu-runner | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install dependencies | ||
run: | | ||
bash scripts/ci_install_dependency.sh | ||
- name: Test experiment runner | ||
timeout-minutes: 120 | ||
run: | | ||
cd test/srt | ||
python3 experiment_runner.py --config ${{ inputs.script }} |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
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@v3 | ||
|
||
- name: Check clang-format | ||
uses: DoozyX/[email protected] | ||
with: | ||
source: sgl-kernel | ||
extensions: h,c,cpp,hpp,cu,cuh,cc | ||
clangFormatVersion: 16 | ||
style: file | ||
|
||
build-wheels: | ||
if: github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request' | ||
runs-on: sgl-kernel-build-node | ||
strategy: | ||
matrix: | ||
python-version: ['3.9'] | ||
cuda-version: ['12.4'] | ||
|
||
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 wheels for Python ${{ matrix.python-version }} and CUDA ${{ matrix.cuda-version }} | ||
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-* | ||
|
||
- name: Install | ||
run: | | ||
pip3 install torch==2.5.1 && pip3 install pytest && pip3 install vllm==0.6.4.post1 | ||
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 | ||
find tests -name "test_*.py" | xargs -n 1 python3 | ||
- name: Uninstall dependencies | ||
run: | | ||
pip3 uninstall sgl-kernel -y | ||
finish: | ||
needs: [unit-test, lint] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Finish | ||
run: echo "This is an empty step to ensure that all jobs are completed." |
Oops, something went wrong.