SGLang Kernels for Ascend NPU
Supported Hardware Models: Atlas A3 Series Products Platform: aarch64/x86 Supporting Software
- Driver Ascend HDK 25.0.RC1.1, CANN 8.3.RC1 or later versions (refer to the "CANN Software Installation Guide" to install the CANN development kit package, as well as the supporting firmware and drivers)
- Before installing CANN software, you need to install the relevant dependency list
- Python >= 3.7
- pybind11 (install via
pip install pybind11)
- Prepare the CANN environment variables (modify according to the installation path)
source /usr/local/Ascend/ascend-toolkit/set_env.sh- Build the project Executing the engineering build script build.sh
# Building Project
bash build.sh- Pip install the
.whlfile into your Python environment
pip install output/sgl_kernel_npu*.whl
# (Optional) Confirm whether the import can be successfully
python -c "import sgl_kernel_npu; print(sgl_kernel_npu.__path__)"- Execute the environment variables for CANN (modify according to the installation path)
source /usr/local/Ascend/ascend-toolkit/set_env.sh- In the Python project, import
sgl_kernel_npu.
Execute sgl_kernel_npu test scripts, for example
python3 tests/python/sgl_kernel_npu/test_hello_world.py