[Build] Fix DeepEP CUDA driver stub linking (#50103)

Signed-off-by: khluu <khluu000@gmail.com>
Co-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
Kevin H. Luu
2026-07-28 12:09:19 +00:00
committed by GitHub
co-authored by OpenAI Codex
parent 912d6b619d
commit d2bfc6fe20
@@ -197,6 +197,21 @@ do_build() {
#endif' csrc/kernels/backend/symmetric.hpp
fi
if [[ "$name" == "DeepEP" ]]; then
# DeepEP links against the CUDA driver API in driverless build images.
local cuda_driver_stub
local cuda_driver_stub_dir
cuda_driver_stub=$(
find -H "$CUDA_HOME" -path "*/stubs/libcuda.so" -print -quit
)
if [[ -z "$cuda_driver_stub" ]]; then
echo "CUDA driver stub not found under $CUDA_HOME" >&2
exit 1
fi
cuda_driver_stub_dir=$(dirname "$cuda_driver_stub")
export LIBRARY_PATH="${cuda_driver_stub_dir}${LIBRARY_PATH:+:$LIBRARY_PATH}"
fi
if [ "$MODE" = "install" ]; then
echo "Installing $name into environment"
eval "$extra_env" uv pip install --no-build-isolation -vvv .