Skip to content

Commit 367c6f9

Browse files
committed
TL/UCP: avoid unrelated config table formatting
1 parent 828683a commit 367c6f9

1 file changed

Lines changed: 52 additions & 99 deletions

File tree

src/components/tl/ucp/tl_ucp.c

Lines changed: 52 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -48,263 +48,216 @@ ucc_status_t ucc_tl_ucp_memh_pack(const ucc_base_context_t *context, ucc_mem_map
4848
ucc_status_t ucc_tl_ucp_mem_unmap(const ucc_base_context_t *context, ucc_mem_map_mode_t mode,
4949
ucc_mem_map_tl_t *memh);
5050

51+
/* clang-format off */
5152
ucc_config_field_t ucc_tl_ucp_lib_config_table[] = {
52-
{"",
53-
"",
54-
NULL,
55-
ucc_offsetof(ucc_tl_ucp_lib_config_t, super),
53+
{"", "", NULL, ucc_offsetof(ucc_tl_ucp_lib_config_t, super),
5654
UCC_CONFIG_TYPE_TABLE(ucc_tl_lib_config_table)},
5755

58-
{"ALLGATHER_BATCHED_NUM_POSTS",
59-
"auto",
56+
{"ALLGATHER_BATCHED_NUM_POSTS", "auto",
6057
"Maximum number of outstanding send and receive messages in allgather "
6158
"batched algorithm",
6259
ucc_offsetof(ucc_tl_ucp_lib_config_t, allgather_batched_num_posts),
6360
UCC_CONFIG_TYPE_ULUNITS},
6461

65-
{"ALLTOALL_PAIRWISE_NUM_POSTS",
66-
"auto",
62+
{"ALLTOALL_PAIRWISE_NUM_POSTS", "auto",
6763
"Maximum number of outstanding send and receive messages in alltoall "
6864
"pairwise algorithm",
6965
ucc_offsetof(ucc_tl_ucp_lib_config_t, alltoall_pairwise_num_posts),
7066
UCC_CONFIG_TYPE_ULUNITS},
7167

72-
{"ALLTOALLV_PAIRWISE_NUM_POSTS",
73-
"auto",
68+
{"ALLTOALLV_PAIRWISE_NUM_POSTS", "auto",
7469
"Maximum number of outstanding send and receive messages in alltoallv "
7570
"pairwise algorithm",
7671
ucc_offsetof(ucc_tl_ucp_lib_config_t, alltoallv_pairwise_num_posts),
7772
UCC_CONFIG_TYPE_ULUNITS},
7873

79-
/* TODO: add radix to config once it's fully supported by the algorithm
80-
{"ALLTOALLV_HYBRID_RADIX", "2",
81-
"Radix of the Hybrid Alltoallv algorithm",
82-
ucc_offsetof(ucc_tl_ucp_lib_config_t, alltoallv_hybrid_radix),
83-
UCC_CONFIG_TYPE_UINT},
84-
*/
85-
{"ALLTOALLV_HYBRID_NUM_SCRATCH_SENDS",
86-
"1",
74+
/* TODO: add radix to config once it's fully supported by the algorithm
75+
{"ALLTOALLV_HYBRID_RADIX", "2",
76+
"Radix of the Hybrid Alltoallv algorithm",
77+
ucc_offsetof(ucc_tl_ucp_lib_config_t, alltoallv_hybrid_radix),
78+
UCC_CONFIG_TYPE_UINT},
79+
*/
80+
{"ALLTOALLV_HYBRID_NUM_SCRATCH_SENDS", "1",
8781
"Number of send operations issued from scratch buffer per radix step",
8882
ucc_offsetof(ucc_tl_ucp_lib_config_t, alltoallv_hybrid_num_scratch_sends),
8983
UCC_CONFIG_TYPE_UINT},
9084

91-
{"ALLTOALLV_HYBRID_NUM_SCRATCH_RECVS",
92-
"3",
85+
{"ALLTOALLV_HYBRID_NUM_SCRATCH_RECVS", "3",
9386
"Number of recv operations issued from scratch buffer per radix step",
9487
ucc_offsetof(ucc_tl_ucp_lib_config_t, alltoallv_hybrid_num_scratch_recvs),
9588
UCC_CONFIG_TYPE_UINT},
9689

97-
{"ALLTOALLV_HYBRID_PAIRWISE_NUM_POSTS",
98-
"3",
90+
{"ALLTOALLV_HYBRID_PAIRWISE_NUM_POSTS", "3",
9991
"The maximum number of pairwise messages to send before waiting for "
10092
"completion",
10193
ucc_offsetof(ucc_tl_ucp_lib_config_t, alltoallv_hybrid_pairwise_num_posts),
10294
UCC_CONFIG_TYPE_UINT},
10395

104-
{"ALLTOALLV_HYBRID_BUFF_SIZE",
105-
"256k",
96+
{"ALLTOALLV_HYBRID_BUFF_SIZE", "256k",
10697
"Total size of scratch buffer, used for sends and receives",
10798
ucc_offsetof(ucc_tl_ucp_lib_config_t, alltoallv_hybrid_buff_size),
10899
UCC_CONFIG_TYPE_MEMUNITS},
109100

110-
{"ALLTOALLV_HYBRID_CHUNK_BYTE_LIMIT",
111-
"12k",
101+
{"ALLTOALLV_HYBRID_CHUNK_BYTE_LIMIT", "12k",
112102
"Max size of data send in pairwise step of hybrid alltoallv algorithm",
113103
ucc_offsetof(ucc_tl_ucp_lib_config_t, alltoallv_hybrid_chunk_byte_limit),
114104
UCC_CONFIG_TYPE_MEMUNITS},
115105

116-
{"ALLTOALL_ONESIDED_PERCENT_BW",
117-
"100",
106+
{"ALLTOALL_ONESIDED_PERCENT_BW", "100",
118107
"Percentage (1-100) of NIC bandwidth to use for congestion avoidance",
119108
ucc_offsetof(ucc_tl_ucp_lib_config_t, alltoall_onesided_percent_bw),
120109
UCC_CONFIG_TYPE_UINT},
121110

122-
{"ALLTOALL_ONESIDED_ALG",
123-
"auto",
111+
{"ALLTOALL_ONESIDED_ALG", "auto",
124112
"Algorithm to be used with onesided Alltoall",
125113
ucc_offsetof(ucc_tl_ucp_lib_config_t, alltoall_onesided_alg),
126114
UCC_CONFIG_TYPE_ENUM(ucc_tl_ucp_alltoall_onesided_names)},
127115

128-
{"KN_RADIX",
129-
"0",
116+
{"KN_RADIX", "0",
130117
"Radix of all algorithms based on knomial pattern. When set to a "
131118
"positive value it is used as a convenience parameter to set all "
132119
"other KN_RADIX values",
133-
ucc_offsetof(ucc_tl_ucp_lib_config_t, kn_radix),
134-
UCC_CONFIG_TYPE_UINT},
120+
ucc_offsetof(ucc_tl_ucp_lib_config_t, kn_radix), UCC_CONFIG_TYPE_UINT},
135121

136-
{"BARRIER_KN_RADIX",
137-
"8",
122+
{"BARRIER_KN_RADIX", "8",
138123
"Radix of the recursive-knomial barrier algorithm",
139124
ucc_offsetof(ucc_tl_ucp_lib_config_t, barrier_kn_radix),
140125
UCC_CONFIG_TYPE_UINT},
141126

142-
{"FANIN_KN_RADIX",
143-
"4",
144-
"Radix of the knomial tree fanin algorithm",
127+
{"FANIN_KN_RADIX", "4", "Radix of the knomial tree fanin algorithm",
145128
ucc_offsetof(ucc_tl_ucp_lib_config_t, fanin_kn_radix),
146129
UCC_CONFIG_TYPE_UINT},
147130

148-
{"FANOUT_KN_RADIX",
149-
"4",
150-
"Radix of the knomial tree fanout algorithm",
131+
{"FANOUT_KN_RADIX", "4", "Radix of the knomial tree fanout algorithm",
151132
ucc_offsetof(ucc_tl_ucp_lib_config_t, fanout_kn_radix),
152133
UCC_CONFIG_TYPE_UINT},
153134

154-
{"ALLREDUCE_KN_RADIX",
155-
"auto",
135+
{"ALLREDUCE_KN_RADIX", "auto",
156136
"Radix of the recursive-knomial allreduce algorithm",
157137
ucc_offsetof(ucc_tl_ucp_lib_config_t, allreduce_kn_radix),
158138
UCC_CONFIG_TYPE_UINT_RANGED},
159139

160-
{"ALLREDUCE_SLIDING_WIN_BUF_SIZE",
161-
"65536",
140+
{"ALLREDUCE_SLIDING_WIN_BUF_SIZE", "65536",
162141
"Buffer size of the sliding window allreduce algorithm",
163142
ucc_offsetof(ucc_tl_ucp_lib_config_t, allreduce_sliding_window_buf_size),
164143
UCC_CONFIG_TYPE_MEMUNITS},
165144

166-
{"ALLREDUCE_SLIDING_WIN_PUT_WINDOW_SIZE",
167-
"0",
145+
{"ALLREDUCE_SLIDING_WIN_PUT_WINDOW_SIZE", "0",
168146
"Max concurrent puts in SW Allreduce. 0 means set to team size",
169-
ucc_offsetof(
170-
ucc_tl_ucp_lib_config_t, allreduce_sliding_window_put_window_size),
147+
ucc_offsetof(ucc_tl_ucp_lib_config_t,
148+
allreduce_sliding_window_put_window_size),
171149
UCC_CONFIG_TYPE_UINT},
172150

173-
{"ALLREDUCE_SLIDING_WIN_NUM_GET_BUFS",
174-
"0",
151+
{"ALLREDUCE_SLIDING_WIN_NUM_GET_BUFS", "0",
175152
"Number of get buffers for sliding window AR. 0 means set to team size",
176-
ucc_offsetof(
177-
ucc_tl_ucp_lib_config_t, allreduce_sliding_window_num_get_bufs),
153+
ucc_offsetof(ucc_tl_ucp_lib_config_t,
154+
allreduce_sliding_window_num_get_bufs),
178155
UCC_CONFIG_TYPE_UINT},
179156

180-
{"ALLREDUCE_SRA_KN_RADIX",
181-
"auto",
157+
{"ALLREDUCE_SRA_KN_RADIX", "auto",
182158
"Radix of the scatter-reduce-allgather (SRA) knomial allreduce algorithm",
183159
ucc_offsetof(ucc_tl_ucp_lib_config_t, allreduce_sra_kn_radix),
184160
UCC_CONFIG_TYPE_UINT_RANGED},
185161

186-
{"ALLREDUCE_SRA_KN_PIPELINE",
187-
"auto",
162+
{"ALLREDUCE_SRA_KN_PIPELINE", "auto",
188163
"Pipelining settings for SRA Knomial allreduce algorithm",
189164
ucc_offsetof(ucc_tl_ucp_lib_config_t, allreduce_sra_kn_pipeline),
190165
UCC_CONFIG_TYPE_PIPELINE_PARAMS},
191166

192-
{"REDUCE_SCATTER_KN_RADIX",
193-
"4",
167+
{"REDUCE_SCATTER_KN_RADIX", "4",
194168
"Radix of the knomial reduce-scatter algorithm",
195169
ucc_offsetof(ucc_tl_ucp_lib_config_t, reduce_scatter_kn_radix),
196170
UCC_CONFIG_TYPE_UINT},
197171

198-
{"ALLGATHER_KN_RADIX",
199-
"auto",
200-
"Radix of the knomial allgather algorithm",
172+
{"ALLGATHER_KN_RADIX", "auto", "Radix of the knomial allgather algorithm",
201173
ucc_offsetof(ucc_tl_ucp_lib_config_t, allgather_kn_radix),
202174
UCC_CONFIG_TYPE_UINT_RANGED},
203175

204-
{"ALLGATHER_KN_MIXED_RADICES",
205-
"",
176+
{"ALLGATHER_KN_MIXED_RADICES", "",
206177
"Optional exact mixed-radix schedule for knomial allgather, for example "
207178
"4,4,6. Every radix must be at least 2 and their product must equal the "
208179
"team size. Invalid schedules are rejected",
209180
ucc_offsetof(ucc_tl_ucp_lib_config_t, allgather_kn_mixed_radices),
210181
UCC_CONFIG_TYPE_STRING},
211182

212-
{"BCAST_KN_RADIX",
213-
"4",
214-
"Radix of the recursive-knomial bcast algorithm",
183+
{"BCAST_KN_RADIX", "4", "Radix of the recursive-knomial bcast algorithm",
215184
ucc_offsetof(ucc_tl_ucp_lib_config_t, bcast_kn_radix),
216185
UCC_CONFIG_TYPE_UINT},
217186

218-
{"BCAST_SAG_KN_RADIX",
219-
"auto",
187+
{"BCAST_SAG_KN_RADIX", "auto",
220188
"Radix of the scatter-allgather (SAG) knomial bcast algorithm",
221189
ucc_offsetof(ucc_tl_ucp_lib_config_t, bcast_sag_kn_radix),
222190
UCC_CONFIG_TYPE_UINT_RANGED},
223191

224-
{"REDUCE_KN_RADIX",
225-
"4",
226-
"Radix of the knomial tree reduce algorithm",
192+
{"REDUCE_KN_RADIX", "4", "Radix of the knomial tree reduce algorithm",
227193
ucc_offsetof(ucc_tl_ucp_lib_config_t, reduce_kn_radix),
228194
UCC_CONFIG_TYPE_UINT},
229195

230-
{"REDUCE_SRG_KN_PIPELINE",
231-
"auto",
196+
{"REDUCE_SRG_KN_PIPELINE", "auto",
232197
"Pipelining settings for SRG Knomial reduce algorithm",
233198
ucc_offsetof(ucc_tl_ucp_lib_config_t, reduce_srg_kn_pipeline),
234199
UCC_CONFIG_TYPE_PIPELINE_PARAMS},
235200

236-
{"REDUCE_SRG_KN_RADIX",
237-
"auto",
201+
{"REDUCE_SRG_KN_RADIX", "auto",
238202
"Radix of the scatter-reduce-gather (SRG) knomial reduce algorithm",
239203
ucc_offsetof(ucc_tl_ucp_lib_config_t, reduce_srg_kn_radix),
240204
UCC_CONFIG_TYPE_UINT_RANGED},
241205

242-
{"GATHER_KN_RADIX",
243-
"4",
244-
"Radix of the knomial tree gather algorithm",
206+
{"GATHER_KN_RADIX", "4", "Radix of the knomial tree gather algorithm",
245207
ucc_offsetof(ucc_tl_ucp_lib_config_t, gather_kn_radix),
246208
UCC_CONFIG_TYPE_UINT},
247209

248-
{"GATHERV_LINEAR_NUM_POSTS",
249-
"0",
210+
{"GATHERV_LINEAR_NUM_POSTS", "0",
250211
"Maximum number of outstanding send and receive messages in gatherv "
251212
"linear algorithm",
252213
ucc_offsetof(ucc_tl_ucp_lib_config_t, gatherv_linear_num_posts),
253214
UCC_CONFIG_TYPE_UINT},
254215

255-
{"SCATTER_KN_RADIX",
256-
"4",
257-
"Radix of the knomial scatter algorithm",
216+
{"SCATTER_KN_RADIX", "4", "Radix of the knomial scatter algorithm",
258217
ucc_offsetof(ucc_tl_ucp_lib_config_t, scatter_kn_radix),
259218
UCC_CONFIG_TYPE_UINT},
260219

261-
{"SCATTER_KN_ENABLE_RECV_ZCOPY",
262-
"auto",
220+
{"SCATTER_KN_ENABLE_RECV_ZCOPY", "auto",
263221
"Receive scatter data to user buffer with correct offset using zcopy",
264222
ucs_offsetof(ucc_tl_ucp_lib_config_t, scatter_kn_enable_recv_zcopy),
265223
UCC_CONFIG_TYPE_ON_OFF_AUTO},
266224

267-
{"SCATTERV_LINEAR_NUM_POSTS",
268-
"16",
225+
{"SCATTERV_LINEAR_NUM_POSTS", "16",
269226
"Maximum number of outstanding send and receive messages in scatterv "
270227
"linear algorithm",
271228
ucc_offsetof(ucc_tl_ucp_lib_config_t, scatterv_linear_num_posts),
272229
UCC_CONFIG_TYPE_UINT},
273230

274-
{"REDUCE_AVG_PRE_OP",
275-
"1",
231+
{"REDUCE_AVG_PRE_OP", "1",
276232
"Reduce will perform division by team_size in early stages of the "
277233
"algorithm,\n"
278234
"else - in result",
279235
ucc_offsetof(ucc_tl_ucp_lib_config_t, reduce_avg_pre_op),
280236
UCC_CONFIG_TYPE_BOOL},
281237

282-
{"REDUCE_SCATTER_RING_BIDIRECTIONAL",
283-
"y",
238+
{"REDUCE_SCATTER_RING_BIDIRECTIONAL", "y",
284239
"Launch 2 inverted rings concurrently during ReduceScatter Ring algorithm",
285240
ucc_offsetof(ucc_tl_ucp_lib_config_t, reduce_scatter_ring_bidirectional),
286241
UCC_CONFIG_TYPE_BOOL},
287242

288-
{"REDUCE_SCATTERV_RING_BIDIRECTIONAL",
289-
"y",
243+
{"REDUCE_SCATTERV_RING_BIDIRECTIONAL", "y",
290244
"Launch 2 inverted rings concurrently during ReduceScatterv Ring "
291245
"algorithm",
292246
ucc_offsetof(ucc_tl_ucp_lib_config_t, reduce_scatterv_ring_bidirectional),
293247
UCC_CONFIG_TYPE_BOOL},
294248

295-
{"USE_TOPO",
296-
"try",
249+
{"USE_TOPO", "try",
297250
"Allow usage of tl ucp topo",
298251
ucc_offsetof(ucc_tl_ucp_lib_config_t, use_topo),
299252
UCC_CONFIG_TYPE_TERNARY},
300253

301-
{"RANKS_REORDERING",
302-
"y",
254+
{"RANKS_REORDERING", "y",
303255
"Use topology information in TL UCP to reorder ranks. Requires topo info",
304256
ucc_offsetof(ucc_tl_ucp_lib_config_t, use_reordering),
305257
UCC_CONFIG_TYPE_BOOL},
306258

307259
{NULL}};
260+
/* clang-format on */
308261

309262
const char* ucc_tl_ucp_local_copy_names[] = {
310263
[UCC_TL_UCP_LOCAL_COPY_TYPE_UCP] = "ucp",

0 commit comments

Comments
 (0)