Unverified Commit 3cab5f71 authored by Yineng Zhang's avatar Yineng Zhang Committed by GitHub
Browse files

speedup pr test for sgl-kernel (#3126)

parent 14e754a8
...@@ -30,20 +30,55 @@ jobs: ...@@ -30,20 +30,55 @@ jobs:
clangFormatVersion: 16 clangFormatVersion: 16
style: file style: file
build-wheels:
if: github.repository == 'sgl-project/sglang'
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
cuda-version: ['12.4']
steps:
- 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: unit-test:
if: github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request' if: github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request'
needs: build-wheels
runs-on: 1-gpu-runner runs-on: 1-gpu-runner
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: sgl-kernel/dist/
merge-multiple: true
pattern: wheel-*
- name: Install - name: Install
run: | run: |
pip3 install torch==2.5.1 && pip3 install pytest && pip3 install vllm==0.6.4.post1 pip3 install torch==2.5.1 && pip3 install pytest && pip3 install vllm==0.6.4.post1
pip3 uninstall sgl-kernel -y || true pip3 uninstall sgl-kernel -y || true
find . -name index.lock -delete pip3 install sgl-kernel/dist/*whl --force-reinstall --no-deps
cd sgl-kernel
git submodule deinit --all --force && git submodule sync --recursive && git submodule update --init --force --recursive
pip3 install .
pip3 list | grep sgl-kernel pip3 list | grep sgl-kernel
- name: Run test - name: Run test
......
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