diff --git a/.github/workflows/release-docker-npu-nightly.yml b/.github/workflows/release-docker-npu-nightly.yml index 007aaadd1..522be429c 100644 --- a/.github/workflows/release-docker-npu-nightly.yml +++ b/.github/workflows/release-docker-npu-nightly.yml @@ -80,6 +80,6 @@ jobs: push: ${{ github.repository == 'sgl-project/sglang' && github.event_name != 'pull_request' }} provenance: false build-args: | - SGLANG_KERNEL_NPU_TAG=2026.6.2 + SGLANG_KERNEL_NPU_TAG=2026.7.2 CANN_VERSION=${{ matrix.cann_version }} DEVICE_TYPE=${{ matrix.device_type }} diff --git a/.github/workflows/release-docker-npu.yml b/.github/workflows/release-docker-npu.yml index aa5982f9d..7abfec5d1 100644 --- a/.github/workflows/release-docker-npu.yml +++ b/.github/workflows/release-docker-npu.yml @@ -87,7 +87,7 @@ jobs: push: ${{ github.repository == 'sgl-project/sglang' && github.event_name != 'pull_request' }} provenance: false build-args: | - SGLANG_KERNEL_NPU_TAG=2026.6.2 + SGLANG_KERNEL_NPU_TAG=2026.7.2 CANN_VERSION=${{ matrix.cann_version }} DEVICE_TYPE=${{ matrix.device_type }} SGLANG_TAG=${{ steps.version.outputs.version }} diff --git a/docker/npu.Dockerfile b/docker/npu.Dockerfile index 902451b24..e82bdb1b5 100644 --- a/docker/npu.Dockerfile +++ b/docker/npu.Dockerfile @@ -98,6 +98,18 @@ RUN git clone https://github.com/sgl-project/sglang --branch $SGLANG_TAG /sgl-wo cd /sgl-workspace/sglang/python && rm -rf pyproject.toml && mv pyproject_npu.toml pyproject.toml && \ ${PIP_INSTALL} -v -e .[all_npu] +RUN mkdir cann-custom-ops && \ + cd cann-custom-ops && \ + wget https://github.com/sgl-project/sgl-kernel-npu/releases/download/${SGLANG_KERNEL_NPU_TAG}/custom-ops-${SGLANG_KERNEL_NPU_TAG}-torch2.10.0-cann${CANN_VERSION}-${DEVICE_TYPE}-$(arch).zip && \ + wget https://github.com/sgl-project/sgl-kernel-npu/releases/download/${SGLANG_KERNEL_NPU_TAG}/ops-transformer-${SGLANG_KERNEL_NPU_TAG}-torch2.10.0-cann${CANN_VERSION}-${DEVICE_TYPE}-$(arch).zip && \ + unzip custom-ops-${SGLANG_KERNEL_NPU_TAG}-torch2.10.0-cann${CANN_VERSION}-${DEVICE_TYPE}-$(arch).zip && \ + unzip ops-transformer-${SGLANG_KERNEL_NPU_TAG}-torch2.10.0-cann${CANN_VERSION}-${DEVICE_TYPE}-$(arch).zip && \ + chmod +x *.run && \ + ./CANN-custom_ops-none-linux.$(arch).run --install-path=/usr/local/Ascend/cann-${CANN_VERSION}/opp && \ + ./cann-ops-transformer-custom_linux-$(arch).run --install-path=/usr/local/Ascend/cann-${CANN_VERSION}/opp && \ + ${PIP_INSTALL} custom_ops-1.0-cp311-cp311-linux_$(arch).whl && \ + cd .. && rm -rf cann-custom-ops + # Install Deep-ep # pin wheel to 0.45.1 ref: https://github.com/pypa/wheel/issues/662 RUN ${PIP_INSTALL} wheel==0.45.1 pybind11 pyyaml decorator scipy attrs psutil \ diff --git a/scripts/ci/npu/npu_ci_install_dependency.sh b/scripts/ci/npu/npu_ci_install_dependency.sh index a9b274818..99ff530d8 100755 --- a/scripts/ci/npu/npu_ci_install_dependency.sh +++ b/scripts/ci/npu/npu_ci_install_dependency.sh @@ -61,13 +61,26 @@ ${PIP_INSTALL} triton-ascend==3.2.1.dev20260530 --extra-index-url=https://mirror ### Install sgl-kernel-npu -SGLANG_KERNEL_NPU_TAG="2026.6.2" +SGLANG_KERNEL_NPU_TAG="2026.7.2" mkdir sgl-kernel-npu (cd sgl-kernel-npu && wget "${GITHUB_PROXY_URL:=""}https://github.com/sgl-project/sgl-kernel-npu/releases/download/${SGLANG_KERNEL_NPU_TAG}/sgl-kernel-npu-${SGLANG_KERNEL_NPU_TAG}-torch${PYTORCH_VERSION}-py311-cann9.0.0-${DEVICE_TYPE}-$(arch).zip" \ && unzip ./sgl-kernel-npu-${SGLANG_KERNEL_NPU_TAG}-torch${PYTORCH_VERSION}-py311-cann9.0.0-${DEVICE_TYPE}-$(arch).zip \ && ${UV_PIP_INSTALL} ./deep_ep*.whl ./sgl_kernel_npu*.whl \ && (cd "$(python3 -m pip show deep-ep | grep -E '^Location:' | awk '{print $2}')" && ln -s deep_ep/deep_ep_cpp*.so)) +### Install custom-ops +mkdir cann-custom-ops +(cd cann-custom-ops && \ +wget "${GITHUB_PROXY_URL:=""}https://github.com/sgl-project/sgl-kernel-npu/releases/download/${SGLANG_KERNEL_NPU_TAG}/custom-ops-${SGLANG_KERNEL_NPU_TAG}-torch${PYTORCH_VERSION}-cann9.0.0-${DEVICE_TYPE}-$(arch).zip" && \ +wget "${GITHUB_PROXY_URL:=""}https://github.com/sgl-project/sgl-kernel-npu/releases/download/${SGLANG_KERNEL_NPU_TAG}/ops-transformer-${SGLANG_KERNEL_NPU_TAG}-torch${PYTORCH_VERSION}-cann9.0.0-${DEVICE_TYPE}-$(arch).zip" && \ +unzip custom-ops-${SGLANG_KERNEL_NPU_TAG}-torch${PYTORCH_VERSION}-cann9.0.0-${DEVICE_TYPE}-$(arch).zip && \ +unzip ops-transformer-${SGLANG_KERNEL_NPU_TAG}-torch${PYTORCH_VERSION}-cann9.0.0-${DEVICE_TYPE}-$(arch).zip && \ +chmod +x *.run && \ +./CANN-custom_ops-none-linux.$(arch).run --install-path=/usr/local/Ascend/cann-9.0.0/opp && \ +./cann-ops-transformer-custom_linux-$(arch).run --install-path=/usr/local/Ascend/cann-9.0.0/opp && \ +${PIP_INSTALL} custom_ops-1.0-cp311-cp311-linux_$(arch).whl) +rm -rf cann-custom-ops + ### Install SGLang rm -rf python/pyproject.toml && mv python/pyproject_npu.toml python/pyproject.toml