Skip to content

Commit

Permalink
Merge pull request openucx#11 from nsosnsos/huawei
Browse files Browse the repository at this point in the history
FIX: SELECT RING ALGORITHM FOR LARGE MESSAGE ALLREDUCE OPERATION
  • Loading branch information
nsosnsos authored Dec 2, 2020
2 parents 9dd57be + 2ba7270 commit 95e68fe
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions builtin/builtin.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,20 +570,18 @@ void ucg_builtin_allreduce_decision_fixed(const size_t msg_size,
&& !group_params->op_is_commute_f(coll_params->send.op_ext);
if (is_large_datatype || is_non_commutative) {
ucg_builtin_plan_decision_in_noncommutative_largedata_case(msg_size, allreduce_algo_decision);
} else if (msg_size >= UCG_GROUP_MED_MSG_SIZE) {
/* Ring */
*allreduce_algo_decision = UCG_ALGORITHM_ALLREDUCE_RING;
ucg_builtin_allreduce_algo_switch(*allreduce_algo_decision, &ucg_algo);
} else if (is_unbalanced_ppn) {
/* Node-aware Recursive */
*allreduce_algo_decision = UCG_ALGORITHM_ALLREDUCE_NODE_AWARE_RECURSIVE_AND_BMTREE;
ucg_builtin_allreduce_algo_switch(*allreduce_algo_decision, &ucg_algo);
} else {
if (msg_size < UCG_GROUP_MED_MSG_SIZE) {
/* Node-aware Kinomial tree (DEFAULT) */
*allreduce_algo_decision = UCG_ALGORITHM_ALLREDUCE_NODE_AWARE_KMTREE;
ucg_builtin_allreduce_algo_switch(*allreduce_algo_decision, &ucg_algo);
} else {
/* Ring */
*allreduce_algo_decision = UCG_ALGORITHM_ALLREDUCE_RING;
ucg_builtin_allreduce_algo_switch(*allreduce_algo_decision, &ucg_algo);
}
/* Node-aware Kinomial tree (DEFAULT) */
*allreduce_algo_decision = UCG_ALGORITHM_ALLREDUCE_NODE_AWARE_KMTREE;
ucg_builtin_allreduce_algo_switch(*allreduce_algo_decision, &ucg_algo);
}
}

Expand Down

0 comments on commit 95e68fe

Please sign in to comment.