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

specify the GPU #53

Closed
gq124 opened this issue Mar 12, 2021 · 3 comments
Closed

specify the GPU #53

gq124 opened this issue Mar 12, 2021 · 3 comments

Comments

@gq124
Copy link

gq124 commented Mar 12, 2021

Hi, How to specify the GPU when running a demo program

@neka-nat
Copy link
Owner

Hi,
How about using the CUDA_VISIBLE_DEVICES environment variable?

@gq124
Copy link
Author

gq124 commented Mar 12, 2021

Thank you for your reply. I know running a demo program on linux can use the CUDA_VISIBLE_DEVICES environment variable to specify the GPU. But ,how to specify the GPU device when running a cupoch demo program in vs2019, Do you have any good ideas?

@KalraA
Copy link

KalraA commented Mar 15, 2021

You can set it from python itself.
import os
os.environ['CUDA_VISIBLE_DEVICES'] = '1'
If you put this as the very first lines of python your demo runs it should be the same.

@gq124 gq124 closed this as completed Mar 22, 2021
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