I have two GPUs on one PC and I render in Blender, but this is applicable to any software that doesn’t support GPU affinity yet.
I have setup two different Blender versions in different paths. One renders on GPU1, the other renders on GPU2.
I would like to have each worker override the plugin path so that I can point them to the right path.
But I cannot find such an option in the worker properties.
I can’t think of a built-in feature that will do what you’re asking, but if you’re somewhat comfortable with Python you could patch the Blender plugin to serve your needs.
General concept/brainstorm:
Mark your alternative Blender path for the worker(s) in question
If there was a way to set Blender’s GPU settings from the command line we could inherit the GPU affinity from the Worker, just like we do with Redshift.
Otherwise, I think @danielskovli has got a solid plan here!
Edit: I bet if you were particularly clever with the script here Forcing Blender to use GPU - #16 by karpreet you could set each Worker to use a preconfigured GPU. Maybe even read the Worker’s GPU affinity and pass that along to the script.
Hi Danielskovli,
your solution worked flawlessly without any modification, you just saved me days of wandering around the docs and the code, thank you!
@JustinB thank you for the alternative solution! I am pretty sure you can select the GPU from the command line + an embedded python script in Blender that you can select with an option, but the only script code examples I can find are too outdated and give me runtime errors in Blender, and I am not experienced enough to fix that.