forked from openucx/ucc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TL/CUDA: reduce scatter linear (openucx#669)
* TL/CUDA: reduce scatter linear * REVIEW: fix review comments * REVIEW: fix review comments * fixed algorithm description * fixed datatype in reduce scatterv * added check for average op
- Loading branch information
1 parent
b24612b
commit e2f0e51
Showing
17 changed files
with
796 additions
and
131 deletions.
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
42 changes: 42 additions & 0 deletions
42
src/components/tl/cuda/reduce_scatter/reduce_scatter_linear.c
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/** | ||
* Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
* | ||
* See file LICENSE for terms. | ||
*/ | ||
|
||
#include "reduce_scatterv/reduce_scatterv.h" | ||
#include "reduce_scatter/reduce_scatter.h" | ||
|
||
ucc_status_t ucc_tl_cuda_reduce_scatter_linear_init(ucc_base_coll_args_t *coll_args, | ||
ucc_base_team_t * tl_team, | ||
ucc_coll_task_t ** task_p) | ||
{ | ||
ucc_tl_cuda_team_t *team = ucc_derived_of(tl_team, ucc_tl_cuda_team_t); | ||
ucc_tl_cuda_task_t *task; | ||
ucc_status_t status; | ||
|
||
if (coll_args->args.op == UCC_OP_AVG) { | ||
return UCC_ERR_NOT_SUPPORTED; | ||
} | ||
|
||
status = ucc_tl_cuda_task_init(coll_args, team, &task); | ||
if (ucc_unlikely(status != UCC_OK)) { | ||
return status; | ||
} | ||
|
||
task->reduce_scatterv_linear.get_count = | ||
ucc_tl_cuda_reduce_scatter_get_count; | ||
task->reduce_scatterv_linear.get_offset = | ||
ucc_tl_cuda_reduce_scatter_get_offset; | ||
task->reduce_scatterv_linear.dt = coll_args->args.dst.info.datatype; | ||
task->reduce_scatterv_linear.rbuf = coll_args->args.dst.info.buffer; | ||
task->super.flags |= UCC_COLL_TASK_FLAG_EXECUTOR; | ||
task->super.post = ucc_tl_cuda_reduce_scatterv_linear_start; | ||
task->super.triggered_post = ucc_triggered_post; | ||
task->super.progress = ucc_tl_cuda_reduce_scatterv_linear_progress; | ||
task->super.finalize = ucc_tl_cuda_reduce_scatterv_linear_finalize; | ||
task->bar = TASK_BAR(task); | ||
|
||
*task_p = &task->super; | ||
return UCC_OK; | ||
} |
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
Oops, something went wrong.