Skip to content
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/NCCL: add cuda managed to score #793

Merged
merged 1 commit into from
Jun 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions src/components/tl/nccl/tl_nccl_team.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,10 @@ ucc_status_t ucc_tl_nccl_coll_init(ucc_base_coll_args_t *coll_args,
ucc_status_t ucc_tl_nccl_team_get_scores(ucc_base_team_t *tl_team,
ucc_coll_score_t **score_p)
{
ucc_tl_nccl_team_t *team = ucc_derived_of(tl_team, ucc_tl_nccl_team_t);
ucc_base_context_t *ctx = UCC_TL_TEAM_CTX(team);
ucc_memory_type_t mt = UCC_MEMORY_TYPE_CUDA;
ucc_tl_nccl_team_t *team = ucc_derived_of(tl_team, ucc_tl_nccl_team_t);
ucc_base_context_t *ctx = UCC_TL_TEAM_CTX(team);
ucc_memory_type_t mts[2] = {UCC_MEMORY_TYPE_CUDA,
UCC_MEMORY_TYPE_CUDA_MANAGED};
ucc_coll_score_t *score;
ucc_status_t status;
int i;
Expand All @@ -274,16 +275,16 @@ ucc_status_t ucc_tl_nccl_team_get_scores(ucc_base_team_t *tl_team,
team_info.alg_fn = ucc_tl_nccl_alg_id_to_init;
team_info.default_score = UCC_TL_NCCL_DEFAULT_SCORE;
team_info.init = ucc_tl_nccl_coll_init;
team_info.num_mem_types = 1;
team_info.supported_mem_types = &mt;
team_info.num_mem_types = 2;
team_info.supported_mem_types = mts;
team_info.supported_colls = UCC_TL_NCCL_SUPPORTED_COLLS;
team_info.size = UCC_TL_TEAM_SIZE(team);
/* There can be a different logic for different coll_type/mem_type.
Right now just init everything the same way. */
status =
ucc_coll_score_build_default(tl_team, UCC_TL_NCCL_DEFAULT_SCORE,
ucc_tl_nccl_coll_init, UCC_TL_NCCL_SUPPORTED_COLLS,
&mt, 1, &score);
mts, 2, &score);
if (ucc_unlikely(UCC_OK != status)) {
return status;
}
Expand Down