BlenderProc
BlenderProc copied to clipboard
[FEATURE]: Run On Specify GPU
My computer has multiple GPUs,I want to specify blenderproc to run on GPU 7, how can I achieve that?
I see that the parameters of bproc init() can only specify whether to use the GPU or not.
I try to use os.environ["CUDA_VISIBLE_DEVICES"] = "7" in python code,but it does not work.
Hey @xubin1994,
unfortunately, it seems that blender ignores the CUDA_VISIBLE_DEVICES
variable. You probably therefore need to adjust the bproc.init() function manually to select only the gpus you want to use (you could also copy the relevant code into your script and do it there). Let me know if you run into any issues doing that.
Hey,
So we have a solution in #630, but we are not happy with it. But, our desired solution would take a quite significant restructure of the init and cleanup fct. Which we don't have the time for right now. So, you can use this solution provided in the branch for now.
Best, Max