BlenderProc icon indicating copy to clipboard operation
BlenderProc copied to clipboard

[FEATURE]: Run On Specify GPU

Open xubin1994 opened this issue 2 years ago • 2 comments

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. image I try to use os.environ["CUDA_VISIBLE_DEVICES"] = "7" in python code,but it does not work.

xubin1994 avatar May 30 '22 03:05 xubin1994

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.

cornerfarmer avatar Jun 03 '22 11:06 cornerfarmer

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

themasterlink avatar Jul 22 '22 07:07 themasterlink