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.
Add sliding window support to urom cl
- Loading branch information
Showing
7 changed files
with
302 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,36 @@ | ||
/** | ||
* Copyright (c) 2021-2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
* Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
* | ||
* See file LICENSE for terms. | ||
*/ | ||
|
||
#ifndef ALLREDUCE_H_ | ||
#define ALLREDUCE_H_ | ||
#include "../cl_hier.h" | ||
#ifndef UROM_ALLREDUCE_H_ | ||
#define UROM_ALLREDUCE_H_ | ||
#include "../cl_urom_coll.h" | ||
#include "../../../tl/ucp/tl_ucp.h" | ||
|
||
enum | ||
{ | ||
UCC_CL_HIER_ALLREDUCE_ALG_RAB, | ||
UCC_CL_HIER_ALLREDUCE_ALG_SPLIT_RAIL, | ||
UCC_CL_HIER_ALLREDUCE_ALG_LAST, | ||
UCC_CL_UROM_ALLREDUCE_ALG_FULL, | ||
UCC_CL_UROM_ALLREDUCE_ALG_LAST, | ||
}; | ||
|
||
extern ucc_base_coll_alg_info_t | ||
ucc_cl_hier_allreduce_algs[UCC_CL_HIER_ALLREDUCE_ALG_LAST + 1]; | ||
ucc_cl_urom_allreduce_algs[UCC_CL_UROM_ALLREDUCE_ALG_LAST + 1]; | ||
|
||
#define UCC_CL_HIER_ALLREDUCE_DEFAULT_ALG_SELECT_STR "allreduce:0-4k:@rab" | ||
ucc_status_t ucc_cl_urom_allreduce_init(ucc_base_coll_args_t *coll_args, | ||
ucc_base_team_t * team, | ||
ucc_coll_task_t ** task); | ||
|
||
ucc_status_t ucc_cl_hier_allreduce_rab_init(ucc_base_coll_args_t *coll_args, | ||
ucc_base_team_t *team, | ||
ucc_coll_task_t **task); | ||
|
||
ucc_status_t | ||
ucc_cl_hier_allreduce_split_rail_init(ucc_base_coll_args_t *coll_args, | ||
ucc_base_team_t *team, | ||
ucc_coll_task_t **task); | ||
|
||
static inline int ucc_cl_hier_allreduce_alg_from_str(const char *str) | ||
static inline int ucc_cl_urom_allreduce_alg_from_str(const char *str) | ||
{ | ||
int i; | ||
|
||
for (i = 0; i < UCC_CL_HIER_ALLREDUCE_ALG_LAST; i++) { | ||
if (0 == strcasecmp(str, ucc_cl_hier_allreduce_algs[i].name)) { | ||
for (i = 0; i < UCC_CL_UROM_ALLREDUCE_ALG_LAST; i++) { | ||
if (0 == strcasecmp(str, ucc_cl_urom_allreduce_algs[i].name)) { | ||
break; | ||
} | ||
} | ||
return i; | ||
} | ||
|
||
#endif | ||
#endif |
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.