neka-nat/cupoch

specify the GPU

gq124 opened this issue · 3 comments

gq124 commented

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

Hi,
How about using the CUDA_VISIBLE_DEVICES environment variable?

gq124 commented

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?

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.