speedup pr test for sgl-kernel (#3126)
This commit is contained in:
43
.github/workflows/pr-test-sgl-kernel.yml
vendored
43
.github/workflows/pr-test-sgl-kernel.yml
vendored
@@ -30,20 +30,55 @@ jobs:
|
||||
clangFormatVersion: 16
|
||||
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:
|
||||
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
|
||||
find . -name index.lock -delete
|
||||
cd sgl-kernel
|
||||
git submodule deinit --all --force && git submodule sync --recursive && git submodule update --init --force --recursive
|
||||
pip3 install .
|
||||
pip3 install sgl-kernel/dist/*whl --force-reinstall --no-deps
|
||||
pip3 list | grep sgl-kernel
|
||||
|
||||
- name: Run test
|
||||
|
||||
Reference in New Issue
Block a user