[GH-ISSUE #647] [hybrid_dispatch] Question on release scope of local-rank Rail bypass path #381

Closed
opened 2026-10-26 09:59:47 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @huakainomore on GitHub (May 26, 2026).
Original GitHub issue: https://github.com/deepseek-ai/DeepEP/issues/647

Summary

hybrid_dispatch.cuh calls gin.red_add_rel<ncclTeamTagRail> to update the scaleout_channel_signaled_tail slot. On the local-rank bypass path this dispatches to ptx::red_add_rel_sys in handle.cuh, emitting red.release.sys.global.add.u64.
After tracing through get_sym_ptr<ncclTeamTagRail>, we are wondering whether .gpu might also be sufficient here, or whether there is a specific reason .sys is required that we are missing?

Question about the existing comment

the commentNOTES: the "release" scope will be sys for the local rank (we may involve NVLink so not gpu) mentions NVLink, but the only NVLink-bearing path goes through ncclTeamTagLsa/ncclTeamTagWorld, not ncclTeamTagRail. Is there a code path we missed where Rail can land on an NVLink peer?

Proposed change

Add a red_add_rel_gpu overload (or a scope tag) to NCCLGin so the call site can opt into .gpu release:

  // handle.cuh — new overload alongside existing red_add_rel
  template <typename team_t, typename dtype_t>
  __device__ __forceinline__
  void red_add_rel_gpu(dtype_t* sym_ptr, const dtype_t& value,
                       const int& dst_rank_idx,
                       const int& extra_options = 0) const {
      const auto dst_ptr = get_sym_ptr<team_t>(sym_ptr, dst_rank_idx);
      if (dst_ptr != nullptr) {
          ptx::red_add_rel_gpu(dst_ptr, value);   // <-- .gpu instead of
  .sys
      } else {
          // RDMA path unchanged: atomic provides system-scope ordering
          gin.signal(...);
      }
  }

The same change applies to hybrid_combine.cuh by the same reasoning.

Questions

  1. Is there a non-local consumer of scaleout_channel_signaled_tail_ptr we might have missed ?
  2. Is the NVLink mention in the comment a leftover from an earlier design, or does Rail ever land on an NVLink peer in some configuration?

update

  1. ~30% improvement when ep16 with 12 SMs
  2. 5% improvement when ep16 with 16 SMs
Originally created by @huakainomore on GitHub (May 26, 2026). Original GitHub issue: https://github.com/deepseek-ai/DeepEP/issues/647 ## Summary `hybrid_dispatch.cuh` calls `gin.red_add_rel<ncclTeamTagRail>` to update the `scaleout_channel_signaled_tail` slot. On the local-rank bypass path this dispatches to `ptx::red_add_rel_sys` in `handle.cuh`, emitting `red.release.sys.global.add.u64`. After tracing through `get_sym_ptr<ncclTeamTagRail>`, we are wondering whether `.gpu` might also be sufficient here, or whether there is a specific reason `.sys` is required that we are missing? ## Question about the existing comment the comment`NOTES: the "release" scope will be `sys` for the local rank (we may involve NVLink so not gpu)` mentions NVLink, but the only NVLink-bearing path goes through ncclTeamTagLsa/ncclTeamTagWorld, not ncclTeamTagRail. Is there a code path we missed where Rail can land on an NVLink peer? ## Proposed change Add a red_add_rel_gpu overload (or a scope tag) to NCCLGin so the call site can opt into .gpu release: ``` // handle.cuh — new overload alongside existing red_add_rel template <typename team_t, typename dtype_t> __device__ __forceinline__ void red_add_rel_gpu(dtype_t* sym_ptr, const dtype_t& value, const int& dst_rank_idx, const int& extra_options = 0) const { const auto dst_ptr = get_sym_ptr<team_t>(sym_ptr, dst_rank_idx); if (dst_ptr != nullptr) { ptx::red_add_rel_gpu(dst_ptr, value); // <-- .gpu instead of .sys } else { // RDMA path unchanged: atomic provides system-scope ordering gin.signal(...); } } ``` The same change applies to hybrid_combine.cuh by the same reasoning. ## Questions 1. Is there a non-local consumer of scaleout_channel_signaled_tail_ptr we might have missed ? 2. Is the NVLink mention in the comment a leftover from an earlier design, or does Rail ever land on an NVLink peer in some configuration? ### update 1. ~30% improvement when ep16 with 12 SMs 2. 5% improvement when ep16 with 16 SMs
Author
Owner

@gangxie112 commented on GitHub (May 26, 2026):

@sphish

<!-- gh-comment-id:4542269025 --> @gangxie112 commented on GitHub (May 26, 2026): @sphish
Author
Owner

@polarstormx commented on GitHub (Sep 18, 2026):

This has been addressed in https://github.com/deepseek-ai/DeepEP/pull/674 (commit github.com/deepseek-ai/DeepEP@099d5f2bad). Closing as resolved.

<!-- gh-comment-id:5727330148 --> @polarstormx commented on GitHub (Sep 18, 2026): This has been addressed in https://github.com/deepseek-ai/DeepEP/pull/674 (commit https://github.com/deepseek-ai/DeepEP/commit/099d5f2bad488b9c534ea785062b12f2e91d1d41). Closing as resolved.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/DeepEP#381
No description provided.