@@ -180,7 +180,6 @@ static inline ncclDataType_t convert_data_type(int typecode) {
180180 case GA_LONG : return ncclInt64 ;
181181 case GA_ULONG : return ncclUint64 ;
182182 case GA_HALF : return ncclHalf ;
183- case GA_FLOAT16 : return ncclHalf ;
184183 }
185184 return nccl_NUM_TYPES ;
186185}
@@ -237,8 +236,9 @@ static inline int check_restrictions(gpudata *src, size_t offsrc,
237236static int reduce (gpudata * src , size_t offsrc , gpudata * dest , size_t offdest ,
238237 size_t count , int typecode , int opcode , int root ,
239238 gpucomm * comm ) {
240- ncclRedOp_t op ;
241- ncclDataType_t datatype ;
239+ // need dummy init so that compiler shuts up
240+ ncclRedOp_t op = nccl_NUM_OPS ;
241+ ncclDataType_t datatype = nccl_NUM_TYPES ;
242242 gpudata * dst = NULL ;
243243 int rank = 0 ;
244244 cuda_context * ctx ;
@@ -286,8 +286,9 @@ static int reduce(gpudata *src, size_t offsrc, gpudata *dest, size_t offdest,
286286static int all_reduce (gpudata * src , size_t offsrc , gpudata * dest ,
287287 size_t offdest , size_t count , int typecode , int opcode ,
288288 gpucomm * comm ) {
289- ncclRedOp_t op ;
290- ncclDataType_t datatype ;
289+ // need dummy init so that compiler shuts up
290+ ncclRedOp_t op = nccl_NUM_OPS ;
291+ ncclDataType_t datatype = nccl_NUM_TYPES ;
291292 cuda_context * ctx ;
292293
293294 ASSERT_BUF (src );
@@ -323,8 +324,9 @@ static int all_reduce(gpudata *src, size_t offsrc, gpudata *dest,
323324static int reduce_scatter (gpudata * src , size_t offsrc , gpudata * dest ,
324325 size_t offdest , size_t count , int typecode ,
325326 int opcode , gpucomm * comm ) {
326- ncclRedOp_t op ;
327- ncclDataType_t datatype ;
327+ // need dummy init so that compiler shuts up
328+ ncclRedOp_t op = nccl_NUM_OPS ;
329+ ncclDataType_t datatype = nccl_NUM_TYPES ;
328330 int ndev = 0 ;
329331 size_t resc_size ;
330332 cuda_context * ctx ;
@@ -368,7 +370,8 @@ static int reduce_scatter(gpudata *src, size_t offsrc, gpudata *dest,
368370 */
369371static int broadcast (gpudata * array , size_t offset , size_t count , int typecode ,
370372 int root , gpucomm * comm ) {
371- ncclDataType_t datatype ;
373+ // need dummy init so that compiler shuts up
374+ ncclDataType_t datatype = nccl_NUM_TYPES ;
372375 int rank = 0 ;
373376 cuda_context * ctx ;
374377
@@ -407,7 +410,8 @@ static int broadcast(gpudata *array, size_t offset, size_t count, int typecode,
407410static int all_gather (gpudata * src , size_t offsrc , gpudata * dest ,
408411 size_t offdest , size_t count , int typecode ,
409412 gpucomm * comm ) {
410- ncclDataType_t datatype ;
413+ // need dummy init so that compiler shuts up
414+ ncclDataType_t datatype = nccl_NUM_TYPES ;
411415 int ndev = 0 ;
412416 size_t resc_size ;
413417 cuda_context * ctx ;
0 commit comments