def pick_gpus_nvidia(cuda_gpus, n_gpus):
    """
    Pick one or more Nvidia GPUs.
    """
    if len(cuda_gpus) < n_gpus:
        raise ValueError(
            'Not enough Nvidia GPU: requested %d, but can get only %d' % (
            n_gpus, len(cuda_gpus)))
    gpus_cc = []
    for gpu_id, gpu in cuda_gpus.items():
        cc = gpu['compute_capability']
        gpus_cc.append((gpu_id, cc[0] + 0.1 * cc[1]))
    gpus_cc_sorted = sorted(gpus_cc, key=lambda x: x[1], reverse=True)
    res = []
    for i in range(n_gpus):
        res.append(cuda_gpus[gpus_cc_sorted[i][0]])
    return res
