forked from sgl-project/sglang
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into main_w8a8_fp8
- Loading branch information
Showing
29 changed files
with
543 additions
and
185 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
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,92 @@ | ||
name: Release SGLang Kernel Wheel (cu118) | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag_name: | ||
type: string | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- sgl-kernel/version.py | ||
|
||
jobs: | ||
build-wheels: | ||
if: github.repository == 'sgl-project/sglang' | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.9', '3.10', '3.11', '3.12'] | ||
cuda-version: ['11.8'] | ||
|
||
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/* | ||
|
||
release: | ||
needs: build-wheels | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Download artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: sgl-kernel/dist/ | ||
merge-multiple: true | ||
pattern: wheel-* | ||
|
||
- name: Set tag name | ||
id: set_tag_name | ||
run: | | ||
if [ -z "${{ inputs.tag_name }}" ]; then | ||
TAG_NAME="v$(cat sgl-kernel/version.py | cut -d'"' -f2)" | ||
echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT | ||
else | ||
echo "tag_name=${{ inputs.tag_name }}" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
tag_name: ${{ steps.set_tag_name.outputs.tag_name }} | ||
repository: sgl-project/whl | ||
token: ${{ secrets.WHL_TOKEN }} | ||
files: | | ||
sgl-kernel/dist/* | ||
- name: Clone wheel index | ||
run: git clone https://oauth2:${WHL_TOKEN}@github.com/sgl-project/whl.git sgl-whl | ||
env: | ||
WHL_TOKEN: ${{ secrets.WHL_TOKEN }} | ||
|
||
- name: Update wheel index | ||
run: python3 scripts/update_kernel_whl_index.py | ||
|
||
- name: Push wheel index | ||
run: | | ||
cd sgl-whl | ||
git config --local user.name "github-actions[bot]" | ||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git add -A | ||
git commit -m "update whl index" | ||
git push |
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
1 change: 0 additions & 1 deletion
1
benchmark/kernels/fused_moe_triton/benchmark_deepseekv3_moe_align_blocks.py
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
import argparse | ||
import itertools | ||
import time | ||
|
||
import torch | ||
import triton | ||
|
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 |
---|---|---|
|
@@ -28,6 +28,7 @@ | |
- XVERSE / XVERSE MoE | ||
- SmolLM | ||
- GLM-4 | ||
- Phi-3 / Phi-4 | ||
- Phi-3-Small | ||
- IBM Granite 3 | ||
|
||
|
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,16 @@ | ||
# Reference: https://github.com/flashinfer-ai/flashinfer/blob/v0.2.0/scripts/update_whl_index.py | ||
|
||
import hashlib | ||
import pathlib | ||
import re | ||
|
||
for path in sorted(pathlib.Path("sgl-kernel/dist").glob("*.whl")): | ||
with open(path, "rb") as f: | ||
sha256 = hashlib.sha256(f.read()).hexdigest() | ||
ver = re.findall(r"sgl_kernel-([0-9.]+(?:\.post[0-9]+)?)-", path.name)[0] | ||
index_dir = pathlib.Path(f"sgl-whl/cu118/sgl-kernel") | ||
index_dir.mkdir(exist_ok=True) | ||
base_url = "https://github.com/sgl-project/whl/releases/download" | ||
full_url = f"{base_url}/v{ver}/{path.name}#sha256={sha256}" | ||
with (index_dir / "index.html").open("a") as f: | ||
f.write(f'<a href="{full_url}">{path.name}</a><br>\n') |
Submodule flashinfer
updated
44 files
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 |
---|---|---|
@@ -1,5 +1,19 @@ | ||
# SGL Kernel | ||
|
||
Kernel Library for SGLang | ||
[Kernel Library](https://github.com/sgl-project/sglang/tree/main/sgl-kernel) for SGLang | ||
|
||
[![PyPI](https://img.shields.io/pypi/v/sgl-kernel)](https://pypi.org/project/sgl-kernel) | ||
|
||
## Installation | ||
|
||
For CUDA 11.8: | ||
|
||
```bash | ||
pip3 install sgl-kernel -i https://docs.sglang.ai/whl/cu118 | ||
``` | ||
|
||
For CUDA 12.1 or CUDA 12.4: | ||
|
||
```bash | ||
pip3 install sgl-kernel | ||
``` |
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
Oops, something went wrong.