Skip to content

[Feature] Optimize forward metadata collection across dp ranks #1857

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

jianzs
Copy link
Collaborator

@jianzs jianzs commented Jul 17, 2025

Resubmit #1593

What this PR does / why we need it?

This PR introduces two optimizations for cases where data parallel size > 1:

  1. Eliminates DP communication in set_forward_context
  2. Implements HCCL for DP metadata communication, resulting in significant performance improvements for large DP configurations
    • Achieves ~20ms latency reduction with DP size of 64

Does this PR introduce any user-facing change?

no

How was this patch tested?

CI passed.

@jianzs jianzs force-pushed the feat/dp-comm-opt branch from d35cbf3 to f8eba17 Compare July 17, 2025 11:46
Copy link

codecov bot commented Jul 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.80%. Comparing base (33ef5dc) to head (2b0c3c1).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1857   +/-   ##
=======================================
  Coverage   54.80%   54.80%           
=======================================
  Files          75       75           
  Lines        9327     9327           
=======================================
  Hits         5112     5112           
  Misses       4215     4215           
Flag Coverage Δ
unittests 54.80% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Yikun
Copy link
Collaborator

Yikun commented Jul 17, 2025

Rebase here: f9dfde0

@jianzs jianzs force-pushed the feat/dp-comm-opt branch from f8eba17 to 7b605f8 Compare July 17, 2025 12:46
@jianzs jianzs force-pushed the feat/dp-comm-opt branch from 7b605f8 to 2b0c3c1 Compare July 18, 2025 03:15
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.

3 participants