Skip to content

[Bugfix][NVSHMEM] Support v2 state in legacy IBGDA kernels - #765

Closed
XFDG wants to merge 1 commit into
deepseek-ai:mainfrom
XFDG:fix/deepep-764-nvshmem-v2
Closed

XFDG wants to merge 1 commit into
deepseek-ai:mainfrom
XFDG:fix/deepep-764-nvshmem-v2

Conversation

@XFDG

@XFDG XFDG commented Sep 25, 2026 •

Copy link
Copy Markdown

Summary

Port NVSHMEM v2 IBGDA RC indexing support into DeepEP's legacy kernels.

Fix

  • Preserve the existing RC mapping for NVSHMEM v1 state.
  • Use the v2 PE/NPES indexing scheme for the newer state layout.
  • Define __CUDACC_RDC__ when NVSHMEM is enabled so device symbols use the correct extern declarations.

Testing

  • Full SM100 extension build, NVSHMEM device-link, and shared-library link passed with CUDA 13.1, NVSHMEM 3.5.21, and isolated NCCL 2.32.3.
  • csrc/kernels/legacy/internode.cu and internode_ll.cu also compiled for SM100 with NVSHMEM 3.4.5.
  • An extension import smoke test failed in the available Torch environment with ImportError: unsupported scalarType; therefore runtime behavior is not claimed as verified.
  • Cross-node IBGDA runtime testing was not available on the single 8-GPU node.

Fixes #764

@XFDG

XFDG commented Sep 28, 2026

Copy link
Copy Markdown
Author

Validation update for head 2ba5e7d: on B200/SM100 with CUDA 13.1, NVSHMEM 3.5.21 and NCCL 2.32.3, the extension completes all 9 build/link steps. Loading the built deep_ep._C artifact and importing deep_ep (including init_jit) now succeeds with the matching NCCL 2.32.3 directory first in LD_LIBRARY_PATH. Without that setting, the process loads system NCCL 2.29.2 and the package correctly rejects the version mismatch. This confirms the current import smoke in the aligned environment; I have not run a multi-node IBGDA runtime test.

@XFDG
XFDG force-pushed the fix/deepep-764-nvshmem-v2 branch from 2ba5e7d to 4dbea47 Compare September 28, 2026 05:24
@XFDG

XFDG commented Oct 1, 2026

Copy link
Copy Markdown
Author

Closing this PR because the current main branch removed the affected legacy IBGDA implementation in DeepEP V2.5 (#763). The remaining NVSHMEM compilation guard also has no current source/build consumer, so restoring the deleted legacy code merely to resolve the conflict would not be appropriate. This is an obsolete fix, not a claim that this PR was merged. Historical validation results remain in the PR for reference. Thanks for reviewing.

@XFDG XFDG closed this Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compatibility issues with NVSHMEM version 3.5

1 participant