-
Notifications
You must be signed in to change notification settings - Fork 103
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
TL/MLX5: add ctx option to disable a2a #1062
Open
samnordmann
wants to merge
2
commits into
openucx:master
Choose a base branch
from
samnordmann:tl_mlx5/add_flag_to_disable_tl_creation
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+44
−15
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,9 +69,11 @@ UCC_CLASS_INIT_FUNC(ucc_tl_mlx5_team_t, ucc_base_context_t *tl_context, | |
self->global_sync_req = NULL; | ||
|
||
self->a2a = NULL; | ||
status = ucc_tl_mlx5_team_init_alltoall(self); | ||
if (UCC_OK != status) { | ||
return status; | ||
if (ctx->cfg.enable_alltoall) { | ||
status = ucc_tl_mlx5_team_init_alltoall(self); | ||
if (UCC_OK != status) { | ||
return status; | ||
} | ||
} | ||
|
||
self->mcast = NULL; | ||
|
@@ -155,6 +157,7 @@ static inline ucc_status_t ucc_tl_mlx5_a2a_team_test(ucc_base_team_t *team) | |
ucc_status_t ucc_tl_mlx5_team_create_test(ucc_base_team_t *team) | ||
{ | ||
ucc_tl_mlx5_team_t *tl_team = ucc_derived_of(team, ucc_tl_mlx5_team_t); | ||
ucc_tl_mlx5_context_t *ctx = UCC_TL_MLX5_TEAM_CTX(tl_team); | ||
ucc_team_t *core_team = UCC_TL_CORE_TEAM(tl_team); | ||
ucc_subset_t subset = {.map = UCC_TL_TEAM_MAP(tl_team), | ||
.myrank = UCC_TL_TEAM_RANK(tl_team)}; | ||
|
@@ -242,7 +245,7 @@ ucc_status_t ucc_tl_mlx5_team_create_test(ucc_base_team_t *team) | |
} | ||
|
||
ucc_assert(tl_team->global_sync_req == NULL); | ||
|
||
if (tl_team->mcast_state == TL_MLX5_TEAM_STATE_MCAST_CTX_CHECK && | ||
tl_team->a2a_state == TL_MLX5_TEAM_STATE_ALLTOALL_CTX_CHECK) { | ||
// check if ctx is ready for a2a and mcast | ||
|
@@ -253,10 +256,15 @@ ucc_status_t ucc_tl_mlx5_team_create_test(ucc_base_team_t *team) | |
goto initial_sync_post; | ||
} | ||
|
||
a2a_status = ucc_tl_mlx5_a2a_team_test(team); | ||
if (a2a_status < 0) { | ||
tl_warn(team->context->lib, "ALLTOALL tl team: %p creation failed %d", | ||
team, a2a_status); | ||
if (ctx->cfg.enable_alltoall) { | ||
a2a_status = ucc_tl_mlx5_a2a_team_test(team); | ||
if (a2a_status < 0) { | ||
tl_warn(team->context->lib, | ||
"ALLTOALL tl team: %p creation failed %d", team, | ||
a2a_status); | ||
tl_team->a2a_state = TL_MLX5_TEAM_STATE_ALLTOALL_NOT_AVAILABLE; | ||
} | ||
} else { | ||
tl_team->a2a_state = TL_MLX5_TEAM_STATE_ALLTOALL_NOT_AVAILABLE; | ||
} | ||
|
||
|
@@ -269,7 +277,7 @@ ucc_status_t ucc_tl_mlx5_team_create_test(ucc_base_team_t *team) | |
} | ||
} | ||
|
||
if (UCC_OK != a2a_status || UCC_OK != mcast_status) { | ||
if (UCC_INPROGRESS == a2a_status || UCC_INPROGRESS == mcast_status) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not directly related to the present PR but it seems like a bug |
||
return UCC_INPROGRESS; | ||
} | ||
|
||
|
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git-clang-format
made this change