Skip to content

Commit 44e12ce

Browse files
authored
docs: update developer guide for sgl-kernel (sgl-project#3069)
1 parent a547aad commit 44e12ce

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

sgl-kernel/developer_guide.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@ Third-party libraries:
2424

2525
Steps to add a new kernel:
2626

27-
1. Implement in `sgl-kernel/src/sgl-kernel/csrc`
28-
2. Expose interface in `sgl-kernel/csrc/sgl_kernel_ops.cu` with pybind11
29-
3. Create Python wrapper in `sgl-kernel/src/sgl-kernel/ops/__init__.py`
30-
4. Expose Python interface in `sgl-kernel/src/sgl-kernel/__init__.py`
27+
1. Implement in [src/sgl-kernel/csrc/](https://github.com/sgl-project/sglang/tree/main/sgl-kernel/src/sgl-kernel/csrc)
28+
2. Expose interface in [csrc/sgl_kernel_ops.cu](https://github.com/sgl-project/sglang/blob/main/sgl-kernel/src/sgl-kernel/csrc/sgl_kernel_ops.cu) with pybind11
29+
3. Create Python wrapper in [src/sgl-kernel/ops/__init__.py](https://github.com/sgl-project/sglang/blob/main/sgl-kernel/src/sgl-kernel/ops/__init__.py)
30+
4. Expose Python interface in [src/sgl-kernel/__init__.py](https://github.com/sgl-project/sglang/blob/main/sgl-kernel/src/sgl-kernel/__init__.py)
31+
5. Update [setup.py](https://github.com/sgl-project/sglang/blob/main/sgl-kernel/setup.py) to include new CUDA source
3132

3233
### Build & Install
3334

@@ -41,6 +42,10 @@ pip3 install dist/*whl --force-reinstall --no-deps
4142

4243
### Testing & Benchmarking
4344

44-
1. Add pytest tests in `sgl-kernel/tests/`
45-
2. Add benchmarks using [triton benchmark](https://triton-lang.org/main/python-api/generated/triton.testing.Benchmark.html) in `sgl-kernel/benchmark/`
45+
1. Add pytest tests in [tests/](https://github.com/sgl-project/sglang/tree/main/sgl-kernel/tests)
46+
2. Add benchmarks using [triton benchmark](https://triton-lang.org/main/python-api/generated/triton.testing.Benchmark.html) in [benchmark/](https://github.com/sgl-project/sglang/tree/main/sgl-kernel/benchmark)
4647
3. Run test suite
48+
49+
### Release new version
50+
51+
Update version in [pyproject.toml](https://github.com/sgl-project/sglang/blob/main/sgl-kernel/pyproject.toml)

0 commit comments

Comments
 (0)