def _get_nccl_data_type(dtype):
    'Get data type for NCCL'
    if (dtype == numpy.float32):
        nccl_data_type = nccl.NCCL_FLOAT
    elif (dtype == numpy.float16):
        nccl_data_type = nccl.NCCL_HALF
    elif (dtype == numpy.float64):
        nccl_data_type = nccl.NCCL_DOUBLE
    else:
        raise RuntimeError('Unexpected data type:{}'.format(dtype))
    return nccl_data_type
Get data type for NCCL
def _get_nccl_data_type(dtype):
    
    if (dtype == numpy.float32):
        nccl_data_type = nccl.NCCL_FLOAT
    elif (dtype == numpy.float16):
        nccl_data_type = nccl.NCCL_HALF
    elif (dtype == numpy.float64):
        nccl_data_type = nccl.NCCL_DOUBLE
    else:
        raise RuntimeError('Unexpected data type:{}'.format(dtype))
    return nccl_data_type