Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Couldn't guess the available gpus on this machine (Windows) #9

Open
michael20at opened this issue Nov 17, 2018 · 2 comments
Open

Couldn't guess the available gpus on this machine (Windows) #9

michael20at opened this issue Nov 17, 2018 · 2 comments

Comments

@michael20at
Copy link

michael20at commented Nov 17, 2018

Hi,

when trying python run.py I get "Couldn't guess the available gpus on this machine".

I use WinPython on Win10. After looking into the utils.py file i see the problem at line 53, the nvidia path for gpu is in linux file system (nvidia_dir = '/proc/driver/nvidia/gpus/').

Any way to get this to work on windows?

The concept sounds great, would love to try it out!

@yburda
Copy link
Contributor

yburda commented Nov 18, 2018

I don't have experience with gpus in windows, but could you call the function with n_gpus=the number of gpus you have?
If you figure out a more general solution, feel free to submit a pull request.

@jinyeom
Copy link

jinyeom commented Jan 31, 2019

I solved this issue by simply adding this in if __name__ == '__main__' of run.py before parser = ...

os.environ['CUDA_VISIBLE_DEVICES'] = '0'

This way, you can control which of your GPUs are visible to your code (e.g., I believe, if you have 2 GPUs, you can replace '0' with '0, 1'). Then, guess_available_gpus will know which GPUs to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants