1
1
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
2
2
/*
3
- * Copyright (c) 2024 Advanced Micro Devices, Inc. All rights reserved.
3
+ * Copyright (c) 2024 - 2025 Advanced Micro Devices, Inc. All rights reserved.
4
4
* $COPYRIGHT$
5
5
*
6
6
* Additional copyrights may follow
@@ -66,6 +66,13 @@ int mca_coll_acoll_gather_intra(const void *sbuf, size_t scount, struct ompi_dat
66
66
void * rbuf , size_t rcount , struct ompi_datatype_t * rdtype , int root ,
67
67
struct ompi_communicator_t * comm , mca_coll_base_module_t * module );
68
68
69
+ int mca_coll_acoll_alltoall (const void * sbuf , size_t scount ,
70
+ struct ompi_datatype_t * sdtype ,
71
+ void * rbuf , size_t rcount ,
72
+ struct ompi_datatype_t * rdtype ,
73
+ struct ompi_communicator_t * comm ,
74
+ mca_coll_base_module_t * module );
75
+
69
76
int mca_coll_acoll_reduce_intra (const void * sbuf , void * rbuf , size_t count ,
70
77
struct ompi_datatype_t * dtype , struct ompi_op_t * op , int root ,
71
78
struct ompi_communicator_t * comm , mca_coll_base_module_t * module );
@@ -80,6 +87,8 @@ int mca_coll_acoll_barrier_intra(struct ompi_communicator_t *comm, mca_coll_base
80
87
END_C_DECLS
81
88
82
89
#define MCA_COLL_ACOLL_ROOT_CHANGE_THRESH 10
90
+ #define MCA_COLL_ACOLL_SPLIT_FACTOR_LIST_LEN 6
91
+ #define MCA_COLL_ACOLL_SPLIT_FACTOR_LIST {2, 4, 8, 16, 32, 64}
83
92
84
93
typedef enum MCA_COLL_ACOLL_SG_SIZES {
85
94
MCA_COLL_ACOLL_SG_SIZE_1 = 8 ,
@@ -142,6 +151,18 @@ typedef struct coll_acoll_data {
142
151
int sync [2 ];
143
152
} coll_acoll_data_t ;
144
153
154
+ /* The enum literals are used as indices into arrays and values are
155
+ * assigned to the enum literals so as to ensure it is valid irrespective
156
+ * of what the compiler assigns. */
157
+ typedef enum MCA_COLL_ACOLL_R2R_DIST {
158
+ DIST_CORE = 0 ,
159
+ DIST_L3CACHE ,
160
+ DIST_NUMA ,
161
+ DIST_SOCKET ,
162
+ DIST_NODE ,
163
+ DIST_END
164
+ } MCA_COLL_ACOLL_R2R_DIST_T ;
165
+
145
166
typedef struct coll_acoll_subcomms {
146
167
ompi_communicator_t * local_comm ;
147
168
ompi_communicator_t * local_r_comm ;
@@ -152,6 +173,7 @@ typedef struct coll_acoll_subcomms {
152
173
ompi_communicator_t * orig_comm ;
153
174
ompi_communicator_t * socket_comm ;
154
175
ompi_communicator_t * socket_ldr_comm ;
176
+ ompi_communicator_t * split_comm [MCA_COLL_ACOLL_SPLIT_FACTOR_LIST_LEN ]; // AllToAll odd even split comm
155
177
int num_nodes ;
156
178
int derived_node_size ;
157
179
int is_root_node ;
@@ -170,6 +192,7 @@ typedef struct coll_acoll_subcomms {
170
192
int initialized ;
171
193
int prev_init_root ;
172
194
int num_root_change ;
195
+ MCA_COLL_ACOLL_R2R_DIST_T r2r_dist ;
173
196
174
197
ompi_communicator_t * numa_comm_ldrs ;
175
198
ompi_communicator_t * node_comm ;
@@ -193,6 +216,12 @@ typedef struct coll_acoll_reserve_mem {
193
216
bool reserve_mem_in_use ;
194
217
} coll_acoll_reserve_mem_t ;
195
218
219
+ typedef struct {
220
+ int split_factor ;
221
+ size_t psplit_msg_thresh ;
222
+ size_t xpmem_msg_thresh ;
223
+ } coll_acoll_alltoall_attr_t ;
224
+
196
225
struct mca_coll_acoll_module_t {
197
226
mca_coll_base_module_t super ;
198
227
MCA_COLL_ACOLL_SG_SIZES sg_size ;
@@ -218,6 +247,7 @@ struct mca_coll_acoll_module_t {
218
247
coll_acoll_subcomms_t * * subc ;
219
248
coll_acoll_reserve_mem_t reserve_mem_s ;
220
249
int num_subc ;
250
+ coll_acoll_alltoall_attr_t alltoall_attr ;
221
251
};
222
252
223
253
#ifdef HAVE_XPMEM_H
0 commit comments