OpenNMT / OpenNMT/CTranslate2

Can't hide GPUs to get_cuda_device_count()

Open
#1,693 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
4.7k
Forks
536
Avg merge
12h 12m
Merged PRs (30d)
4

Description

Hi,
thank you for this great project!
I'm running on Windows 11 and ctranslate2 v4.2.1. When running in a machine with gpus, even if I set CUDA_VISIBLE_DEVICES to the empty string, get_cuda_device_count() always returns the number of gpus in the machine.
Is this expected?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Begin at get_cuda_device_count() and reproduce on Windows 11 with CUDA_VISIBLE_DEVICES set to an empty string. Determine the intended device-visibility behavior and verify the result against the reported GPU count; done means the behavior is resolved or explicitly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.