-
|
Hi Purfview, May I ask: How do you compile your binary so that people can use it with and without the cuda libraries installed? Thank you very much! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
It's not "my" libs, it's NVIDIA's.
Then set 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 # 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) |
Beta Was this translation helpful? Give feedback.
It's not "my" libs, it's NVIDIA's.
Then set
devicetocpuby default.I set to cpu by default only if CUDA is not found:
And that's how I set
device_index: