# SGL Kernel [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 12.1 and above: ```bash pip3 install sgl-kernel ``` For CUDA 11.8: ```bash pip3 install sgl-kernel -i https://docs.sglang.ai/whl/cu118 ``` ## Build from source Development build: ```bash make build ``` Note: The `sgl-kernel` is rapidly evolving. If you experience a compilation failure, try using `make rebuild`. ### Build with [ccache](https://github.com/ccache/ccache) ```bash # or `yum install -y ccache`. apt-get install -y ccache # Building with ccache is enabled when ccache is installed and CCACHE_DIR is set. export CCACHE_DIR=/path/to/your/ccache/dir export CCACHE_BACKEND="" export CCACHE_KEEP_LOCAL_STORAGE="TRUE" unset CCACHE_READONLY python -m uv build --wheel -Cbuild-dir=build --color=always . ``` ### Configuring CMake Build Options Cmake options can be configuring by adding `-Ccmake.define.