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.
CL/HIER: 2step reduce algorithm (openucx#854)
* CL/HIER: 2step reduce algorithm originally implemented by V.Petrov * TEST: add 2step reduce to gtest
- Loading branch information
1 parent
ce9821c
commit e353542
Showing
10 changed files
with
472 additions
and
60 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
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,17 @@ | ||
/** | ||
* Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
* | ||
* See file LICENSE for terms. | ||
*/ | ||
|
||
#include "reduce.h" | ||
#include "../reduce/reduce.h" | ||
|
||
ucc_base_coll_alg_info_t | ||
ucc_cl_hier_reduce_algs[UCC_CL_HIER_REDUCE_ALG_LAST + 1] = { | ||
[UCC_CL_HIER_REDUCE_ALG_2STEP] = | ||
{.id = UCC_CL_HIER_REDUCE_ALG_2STEP, | ||
.name = "2step", | ||
.desc = "intra-node and inter-node reduces executed in parallel"}, | ||
[UCC_CL_HIER_REDUCE_ALG_LAST] = { | ||
.id = 0, .name = NULL, .desc = NULL}}; |
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,38 @@ | ||
/** | ||
* Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
* | ||
* See file LICENSE for terms. | ||
*/ | ||
|
||
#ifndef REDUCE_H_ | ||
#define REDUCE_H_ | ||
#include "../cl_hier.h" | ||
|
||
enum | ||
{ | ||
UCC_CL_HIER_REDUCE_ALG_2STEP, | ||
UCC_CL_HIER_REDUCE_ALG_LAST, | ||
}; | ||
|
||
extern ucc_base_coll_alg_info_t | ||
ucc_cl_hier_reduce_algs[UCC_CL_HIER_REDUCE_ALG_LAST + 1]; | ||
|
||
#define UCC_CL_HIER_REDUCE_DEFAULT_ALG_SELECT_STR "reduce:0-4k:@2step" | ||
|
||
ucc_status_t ucc_cl_hier_reduce_2step_init(ucc_base_coll_args_t *coll_args, | ||
ucc_base_team_t *team, | ||
ucc_coll_task_t **task); | ||
|
||
static inline int ucc_cl_hier_reduce_alg_from_str(const char *str) | ||
{ | ||
int i; | ||
|
||
for (i = 0; i < UCC_CL_HIER_REDUCE_ALG_LAST; i++) { | ||
if (0 == strcasecmp(str, ucc_cl_hier_reduce_algs[i].name)) { | ||
break; | ||
} | ||
} | ||
return i; | ||
} | ||
|
||
#endif |
Oops, something went wrong.