Skip to content

Commit 05068be

Browse files
committed
coll/HAN: Add support for XHC on the intra-comm
Signed-off-by: George Katevenis <[email protected]>
1 parent 9088c03 commit 05068be

File tree

4 files changed

+24
-10
lines changed

4 files changed

+24
-10
lines changed

ompi/mca/coll/han/coll_han.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
* reserved.
55
* Copyright (c) 2022 IBM Corporation. All rights reserved
66
* Copyright (c) 2020-2022 Bull S.A.S. All rights reserved.
7+
* Copyright (c) 2023 Computer Architecture and VLSI Systems (CARV)
8+
* Laboratory, ICS Forth. All rights reserved.
79
* $COPYRIGHT$
810
*
911
* Additional copyrights may follow
@@ -44,11 +46,11 @@
4446

4547
/*
4648
* Today;
47-
* . only 2 modules available for intranode (low) level
48-
* . only 2 modules available for internode (up) level
49+
* . 3 modules available for intranode (low) level (tuned, sm, xhc)
50+
* . only 2 modules available for internode (up) level (libnbc, adapt)
4951
*/
5052

51-
#define COLL_HAN_LOW_MODULES 2
53+
#define COLL_HAN_LOW_MODULES 3
5254
#define COLL_HAN_UP_MODULES 2
5355

5456
struct mca_coll_han_bcast_args_s {

ompi/mca/coll/han/coll_han_component.c

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
* reserved.
55
* Copyright (c) 2022 IBM Corporation. All rights reserved
66
* Copyright (c) 2020-2022 Bull S.A.S. All rights reserved.
7+
* Copyright (c) 2023 Computer Architecture and VLSI Systems (CARV)
8+
* Laboratory, ICS Forth. All rights reserved.
79
* $COPYRIGHT$
810
*
911
* Additional copyrights may follow
@@ -43,7 +45,8 @@ ompi_coll_han_components ompi_coll_han_available_components[COMPONENTS_COUNT] =
4345
{ TUNED, "tuned", NULL },
4446
{ SM, "sm", NULL },
4547
{ ADAPT, "adapt", NULL },
46-
{ HAN, "han", NULL }
48+
{ HAN, "han", NULL },
49+
{ XHC, "xhc", NULL }
4750
};
4851

4952
/*
@@ -277,7 +280,7 @@ static int han_register(void)
277280

278281
cs->han_bcast_low_module = 0;
279282
(void) mca_coll_han_query_module_from_mca(c, "bcast_low_module",
280-
"low level module for bcast, 0 tuned, 1 sm",
283+
"low level module for bcast, 0 tuned, 1 sm, 2 xhc",
281284
OPAL_INFO_LVL_9,
282285
&cs->han_bcast_low_module,
283286
&cs->han_op_module_name.bcast.han_op_low_module_name);
@@ -297,7 +300,7 @@ static int han_register(void)
297300

298301
cs->han_reduce_low_module = 0;
299302
(void) mca_coll_han_query_module_from_mca(c, "reduce_low_module",
300-
"low level module for allreduce, 0 tuned, 1 sm",
303+
"low level module for allreduce, 0 tuned, 1 sm, 2 xhc",
301304
OPAL_INFO_LVL_9, &cs->han_reduce_low_module,
302305
&cs->han_op_module_name.reduce.han_op_low_module_name);
303306

@@ -316,7 +319,7 @@ static int han_register(void)
316319

317320
cs->han_allreduce_low_module = 0;
318321
(void) mca_coll_han_query_module_from_mca(c, "allreduce_low_module",
319-
"low level module for allreduce, 0 tuned, 1 sm",
322+
"low level module for allreduce, 0 tuned, 1 sm, 2 xhc",
320323
OPAL_INFO_LVL_9, &cs->han_allreduce_low_module,
321324
&cs->han_op_module_name.allreduce.han_op_low_module_name);
322325

@@ -328,7 +331,7 @@ static int han_register(void)
328331

329332
cs->han_allgather_low_module = 0;
330333
(void) mca_coll_han_query_module_from_mca(c, "allgather_low_module",
331-
"low level module for allgather, 0 tuned, 1 sm",
334+
"low level module for allgather, 0 tuned, 1 sm, 2 xhc",
332335
OPAL_INFO_LVL_9, &cs->han_allgather_low_module,
333336
&cs->han_op_module_name.allgather.han_op_low_module_name);
334337

@@ -340,7 +343,7 @@ static int han_register(void)
340343

341344
cs->han_gather_low_module = 0;
342345
(void) mca_coll_han_query_module_from_mca(c, "gather_low_module",
343-
"low level module for gather, 0 tuned, 1 sm",
346+
"low level module for gather, 0 tuned, 1 sm, 2 xhc",
344347
OPAL_INFO_LVL_9, &cs->han_gather_low_module,
345348
&cs->han_op_module_name.gather.han_op_low_module_name);
346349

@@ -352,7 +355,7 @@ static int han_register(void)
352355

353356
cs->han_scatter_low_module = 0;
354357
(void) mca_coll_han_query_module_from_mca(c, "scatter_low_module",
355-
"low level module for scatter, 0 tuned, 1 sm",
358+
"low level module for scatter, 0 tuned, 1 sm, 2 xhc",
356359
OPAL_INFO_LVL_9, &cs->han_scatter_low_module,
357360
&cs->han_op_module_name.scatter.han_op_low_module_name);
358361

ompi/mca/coll/han/coll_han_dynamic.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* reserved.
66
* Copyright (c) 2020 Bull S.A.S. All rights reserved.
77
* Copyright (c) 2022 IBM Corporation. All rights reserved
8+
* Copyright (c) 2023 Computer Architecture and VLSI Systems (CARV)
9+
* Laboratory, ICS Forth. All rights reserved.
810
*
911
* $COPYRIGHT$
1012
*
@@ -105,6 +107,7 @@ typedef enum COMPONENTS {
105107
SM,
106108
ADAPT,
107109
HAN,
110+
XHC,
108111
COMPONENTS_COUNT
109112
} COMPONENT_T;
110113

ompi/mca/coll/han/coll_han_subcomms.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* of Tennessee Research Foundation. All rights
44
* reserved.
55
* Copyright (c) 2020 Bull S.A.S. All rights reserved.
6+
* Copyright (c) 2023 Computer Architecture and VLSI Systems (CARV)
7+
* Laboratory, ICS Forth. All rights reserved.
68
*
79
* $COPYRIGHT$
810
*
@@ -297,6 +299,10 @@ int mca_coll_han_comm_create(struct ompi_communicator_t *comm,
297299
ompi_comm_split_type(comm, MPI_COMM_TYPE_SHARED, 0,
298300
&comm_info, &(low_comms[1]));
299301

302+
opal_info_set(&comm_info, "ompi_comm_coll_preference", "xhc,^han");
303+
ompi_comm_split_type(comm, MPI_COMM_TYPE_SHARED, 0,
304+
&comm_info, &(low_comms[2]));
305+
300306
/*
301307
* Upgrade libnbc module priority to set up up_comms[0] with libnbc module
302308
* This sub-communicator contains one process per node: processes with the

0 commit comments

Comments
 (0)