From 4587063267d2751ac183c16421aeda3f335cee39 Mon Sep 17 00:00:00 2001 From: Qidong Su Date: Sat, 22 Nov 2025 18:25:13 -0500 Subject: [PATCH] Patch DeepEP when building docker image with CUDA 13 (#29154) Signed-off-by: Qidong Su --- tools/ep_kernels/install_python_libraries.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/ep_kernels/install_python_libraries.sh b/tools/ep_kernels/install_python_libraries.sh index 77af3f68a0505..1cea1bef8dbc9 100755 --- a/tools/ep_kernels/install_python_libraries.sh +++ b/tools/ep_kernels/install_python_libraries.sh @@ -96,6 +96,13 @@ clone_repo() { fi } +deepep_cuda13_patch() { + cuda_version_major=$(${CUDA_HOME}/bin/nvcc --version | egrep -o "release [0-9]+" | cut -d ' ' -f 2) + if [ ${cuda_version_major} -ge 13 ]; then + sed -i "s|f'{nvshmem_dir}/include']|f'{nvshmem_dir}/include', '${CUDA_HOME}/include/cccl']|" "setup.py" + fi +} + do_build() { local repo=$1 local name=$2 @@ -107,6 +114,10 @@ do_build() { clone_repo "$repo" "$name" "$key" "$commit" cd "$name" + if [ "$name" == "DeepEP" ]; then + deepep_cuda13_patch + fi + if [ "$MODE" = "install" ]; then echo "Installing $name into environment" eval "$extra_env" uv pip install --no-build-isolation -vvv .