Skip to content

Stop the comms logger exiting on all_gather_object and monitored_barrier - #8896

Draft
vineethsaivs wants to merge 1 commit into
deepspeedai:masterfrom
vineethsaivs:fix-comms-logger-object-ops
Draft

vineethsaivs wants to merge 1 commit into
deepspeedai:masterfrom
vineethsaivs:fix-comms-logger-object-ops

Conversation

@vineethsaivs

Copy link
Copy Markdown
Contributor

With comms profiling on (prof_all, prof or prof_ops), the first dist.all_gather_object(...) or dist.monitored_barrier() prints wrong comm_op specified and ends the process with exit status 0, so a run stops silently.

Cause: both ops are wrapped in @timed_op, but calc_bw_log has no branch for them and its fallback calls exit(0).

Fix: count all_gather_object with all_gather and monitored_barrier with the barrier ops. Their message size is 0, so bandwidth reads 0, as for broadcast_object_list.

Test: pytest tests/unit/comm/test_comms_logger.py on CPU (gloo, macOS, no GPU): the new supports_every_timed_op case fails before (2 failed, SystemExit: 0), whole file passes after (54 passed). A gloo run with prof_all reproduced the exit before and logs both ops after.

Related open PRs #8695, #8795 and #8798 touch nearby logger code; none cover these two ops.

AI assistance was used to prepare this change; the diff and test results were reviewed before submitting.

calc_bw_log had no branch for these two ops, although both are wrapped in
timed_op. With comms profiling on, the first call printed 'wrong comm_op
specified' and ran exit(0), ending the process with status 0. Count them
like all_gather and barrier.

Signed-off-by: Vineeth Sai <vineethsai4444@gmail.com>

This branch has not been deployed

No deployments
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