Skip to content

[PyTorch] NCCL EP eager mode and drop-on-overflow policy#3229

Draft
phu0ngng wants to merge 12 commits into
NVIDIA:mainfrom
phu0ngng:pyt_ep_eager
Draft

[PyTorch] NCCL EP eager mode and drop-on-overflow policy#3229
phu0ngng wants to merge 12 commits into
NVIDIA:mainfrom
phu0ngng:pyt_ep_eager

Conversation

@phu0ngng

@phu0ngng phu0ngng commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

PENDING: Need to rebase on top of #3222 and #3187

Description

Add two NCCL EP dispatch options to the PyTorch API:

  • Eager mode: sizes dispatch/combine outputs to the per-step recv-token total instead of the static recv_capacity_per_rank.
  • Drop-on-overflow: tokens past max_recv_tokens_per_rank are dropped and dispatch continues, instead of trapping.

Type of change

  • Documentation change (change only to the documentation, either a fix or a new content)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Infra/Build change
  • Code refactoring

Changes

  • ep.h / ep_backend.cpp: add drop_on_overflow group policy and wire num_topk + AUTO recv budget through the group config.
  • pytorch/ep.py: ep_bootstrap(eager=...) toggle captured at bootstrap; EpBuffer reads it to size outputs from the per-step recv-token total and exposes num_recv_tokens. Eager and zero-copy are mutually exclusive, and eager rejects caller-provided output buffers.
  • pytorch/csrc/extensions: plumb the new fields through the dispatch binding.

Checklist:

  • I have read and followed the contributing guidelines
  • The functionality is complete
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

phu0ngng and others added 12 commits July 20, 2026 11:46
Signed-off-by: Phuong Nguyen <phuonguyen@nvidia.com>
…aunchers

Signed-off-by: Phuong Nguyen <phuonguyen@nvidia.com>
…r libtransformer_engine.so, not libnccl_ep)

Signed-off-by: Phuong Nguyen <phuonguyen@nvidia.com>
…cl-extensions migration

Signed-off-by: Phuong Nguyen <phuonguyen@nvidia.com>
…ymm test

Signed-off-by: Phuong Nguyen <phuonguyen@nvidia.com>
Signed-off-by: Phuong Nguyen <phuonguyen@nvidia.com>
…recv-token total

Signed-off-by: Phuong Nguyen <phuonguyen@nvidia.com>

Expose the per-step recv-token total as EpBuffer.num_recv_tokens

Signed-off-by: Phuong Nguyen <phuonguyen@nvidia.com>
Signed-off-by: Phuong Nguyen <phuonguyen@nvidia.com>
Signed-off-by: Phuong Nguyen <phuonguyen@nvidia.com>
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.

1 participant