mirror of
https://github.com/deepseek-ai/DeepEP.git
synced 2026-11-05 00:47:32 +00:00
[PR #627] [MERGED] fix(setup): resolve real NVSHMEM/NCCL SO names for pip-wheel installs #671
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/DeepEP#671
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/deepseek-ai/DeepEP/pull/627
Author: @MayDomine
Created: 5/9/2026
Status: ✅ Merged
Merged: 5/22/2026
Merged by: @sphish
Base:
main← Head:fix/link-pip-wheel-soname📝 Commits (1)
ce78b03fix(setup): resolve real NVSHMEM/NCCL SO names for pip-wheel installs📊 Changes
1 file changed (+36 additions, -9 deletions)
View changed files
📝
setup.py(+36 -9)📄 Description
Summary
Fix
cannot find -l:libnvshmem_host.so(and the analogous NCCL failure) when DeepEP is built against the official NVIDIA pip wheels (nvidia-nvshmem-cu12,nvidia-nccl-cu12).Problem
The pip wheels only ship the SONAME-suffixed libraries:
libnvshmem_host.so.3libnccl.so.2…and omit the unversioned symlinks (
libnvshmem_host.so,libnccl.so) that a system tarball install would create.setup.pycurrently passes-l:libnvshmem_host.soand-l:libnccl.soto the linker. Because-l:NAMEis an exact-name match, ld refuses to considerlibnvshmem_host.so.3and the build fails with:Interestingly,
get_nvshmem_host_lib_name()already exists insetup.pyfor exactly this reason — but it's never wired intoextra_link_args, so the hard-coded string still wins. NCCL has the same hard-coded string and the same wheel-vs-tarball mismatch, just no helper to back it up.Fix
_find_versioned_so(base_dir, prefix)that prefers the unversioned symlink when present (tarball install) and falls back to the SONAME file (pip-wheel install).get_nccl_lib_name()mirroringget_nvshmem_host_lib_name().extra_link_argsso-l:NAMEcarries the real on-disk filename.Test plan
Validated in a container that has only the pip-wheel installs (
nvidia-nvshmem-cu12==3.6.5,nvidia-nccl-cu13==2.30.4) and no system tarball NVSHMEM/NCCL:cannot find -l:libnvshmem_host.so.python setup.py bdist_wheelfinishes successfully.ldd deep_ep/_C*.soresolves both libraries to the wheel-shipped SONAME files:Compatibility
No behaviour change for tarball installs. The helper checks for the unversioned symlink first and uses it when present, so existing setups that rely on
libnvshmem_host.so/libnccl.socontinue to pick those up.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.