Skip to content
Discussion options

You must be logged in to vote

your cuBLAS and cuDNN libraries

It's not "my" libs, it's NVIDIA's.

without cuda on all devices

Then set device to cpu by default.

I set to cpu by default only if CUDA is not found:

parser.add_argument("--device", "-d", default="cuda" if ctranslate2.get_cuda_device_count() > 0 else "cpu", help="")

And that's how I set device_index:

    # if cuda:1 -> device=cuda, device_index=1
    device = args.device
    device_index = 0

    if device.startswith('cuda:'):
        device, device_index = device.split(':')
        device_index = int(device_index)

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@Purfview
Comment options

@kaixxx
Comment options

@Purfview
Comment options

@kaixxx
Comment options

@Purfview
Comment options

Answer selected by Purfview
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants