You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR extends the optional check_asymmetric_dt mechanism so that all ranks participating in gather/scatter collectives always call ucc_service_dt_check, regardless of whether their local ucc_coll_init succeeded. The local init status is encoded in two new int16_t slots (values[4,5]) in the allreduce buffer using the same min/max trick, allowing all ranks to agree on the global outcome rather than having failed ranks silently exit and leave others hanging.
ucc_coll.c: Removes the early-exit after ucc_coll_init for gather/scatter types when check_asymmetric_dt is enabled, passing local_status and a possibly-NULL task to the revised ucc_service_dt_check signature.
ucc_service_coll.c: Expands the allreduce payload from 4 to 6 int16_t values, adds a manual schedule-initialization path for the NULL-base_team case, and improves error-path task-completion handling.
ucc_coll_utils.c: Fixes ucc_copy_asymmetric_buffer to use task->bargs.team->size (ucc_team_t *, always valid) instead of task->team->params.size (ucc_base_team_t *, now potentially NULL).
Confidence Score: 4/5
Safe to merge; the core hang-prevention logic is correct and force-completion paths are carefully guarded against double-completion.
The scheduling changes correctly encode init status in two extra int16_t slots and always route gather/scatter through ucc_service_dt_check, eliminating the targeted hang. The force-completion pattern correctly prevents ucc_schedule_completed_handler from triggering a second completion. The ucc_coll_utils.c fix correctly switches to task->bargs.team. The change touches several interacting paths in the collective scheduling mechanism, warranting careful review.
src/core/ucc_service_coll.c — the force-completion logic in ucc_dt_check_allreduce_post and ucc_dt_check_actual_wrapper_post interacts non-obviously with the UCC_EVENT_COMPLETED_SCHEDULE firing path.
Important Files Changed
Filename
Overview
src/core/ucc_coll.c
Removes early-exit guards around ucc_coll_init for gather/scatter types when check_asymmetric_dt is enabled; all ranks now reach ucc_service_dt_check regardless of local status. Scratch-buffer cleanup before the call is correct.
src/core/ucc_service_coll.c
Allreduce payload grows to 6 int16_t slots; manual schedule init for NULL-base_team case; force-completion paths set n_completed_tasks = n_tasks before calling ucc_task_complete on the schedule, correctly preventing double-complete from the subsequent UCC_EVENT_COMPLETED_SCHEDULE.
src/core/ucc_service_coll.h
Updated docstring and signature for ucc_service_dt_check; clearly documents the must-be-called-on-every-rank contract.
src/schedule/ucc_schedule.h
ucc_dt_check_state gains a 6th slot pair for init-status encoding and a new ar_status field for service-allreduce failures.
src/utils/ucc_coll_utils.c
Fixes ucc_copy_asymmetric_buffer to use task->bargs.team->size (always valid) instead of task->team->params.size (now potentially NULL).
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
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.
What
Extends an opt-in asymmetric-datatype check for rooted collectives to include a status check of
ucc_coll_initensuring all ranks either pass or fail.Why ?
Previously a rank could fail
ucc_coll_initand return an error while other ranks may succeed and hang waiting on the failed process.