Repository navigation
Fix performance regression caused by comms logger and bug in comms_logger.enabled - #8909
Merged
Merged
Conversation
Signed-off-by: Hongwei Chen <[email protected]>
Signed-off-by: Hongwei Chen <[email protected]>
Signed-off-by: Hongwei Chen <[email protected]>
hwchen2017
requested review from
loadams,
tjruwase and
tohtana
as code owners
October 26, 2026 03:26
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
sfc-gh-truwase
approved these changes
Oct 27, 2026
hwchen2017
enabled auto-merge
October 27, 2026 16:00
hwchen2017
disabled auto-merge
October 27, 2026 16:02
pengdurice
enabled auto-merge
October 27, 2026 16:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #8797. With comms logging on, every collective re-read the full history of its timer, so ZeRO-3 step time grew every step and each logged latency was the sum of all earlier calls. Separately,
"comms_logger": {"enabled": false}turned logging on.Root causes
enabledfield is ignored (since DeepSpeed Communication Profiling and Logging #2012).Changes
deepspeed/utils/timer.pyTimerholds one start/stop event pair, created once and recorded again for each interval, plus a running total and count. It no longer keeps a list of every event pair.elapsed()returns the latest start/stop interval.elapsed_total()returns the sum of all intervals since the last reset.mean()returns the plain average since the last reset. It used to be a 10% trimmed mean over the stored records.start(). Sostop()never waits for the device.SynchronizedWallClockTimer.log()printselapsed_total(), so every existing log line is unchanged.CudaEventTimer.NoopTimer.elapsed_total().psutilis imported only whenThroughputTimermonitors memory.deepspeed/comm/config.py,deepspeed/comm/comm.pycomms_logger_enablednow comes from the section'senabledfield. A missing section is parsed with its defaults, the same way thecompilesection is._configure_using_config_fileintodeepspeed.comm.configure().timer_summaryglobal.configargument ofdeepspeed.init_distributed();Related PRs
steps_per_printis above 1024. Logged latencies also stay cumulative, and steps stay much slower than without logging. This PR fixes the cause instead. Its config change addresses the same bug as comms_logger: honor in-section enabled and bound per-op timer history #8798's.