3
$\begingroup$

I have a machine with multiple GPUs installed. In Preferences->System->CUDA, there's a clear option for indicating which GPU I'd like Cycles to have access to (or None, or Both, or some mixture with the CPU; all when CUDA's in use, of course), but I don't see any corresponding option for Eevee.

When I switch to Rendered View in Eevee, I notice (in a scene with a heavy procedural nodes setup) that my first GPU hits (using GPU-Z to examine each GPU's sensors) 100% load immediately, but my second GPU appears to be doing nothing. The same pattern seems to hold if I render a few frames in the same scene, still in Eevee. (Side note: it could also be that the sensors are bad on the second card, although a few of them behave as I expect, and I also don't notice any meaningful Rendered Display or Render Time difference. May have to do more some more systematic tests, though. EDIT: Did a simple follow-up test by just switching to Cycles. Got positive load detected on second GPU in doing so, so it seems like it's only Eevee that doesn't seem to know how to hit the second GPU.)

Ideally, I'd like to be able to open multiple instances of Blender, and instruct each one to rely on one or the other GPU, when rendering in Eevee. Is this directly supported in Blender? If not, are there any workarounds (e.g., maybe building a virtual machine that only has access to the second GPU, and running Blender inside the VM?)?

$\endgroup$

2 Answers 2

2
$\begingroup$

This is a limitation of EEVEE because EEVEE is a

render engine built using OpenGL

and OpenGL does not support the ability to specify which GPU(s) to use for rendering.

Depending on your OS, driver support, and hardware configuration, you might be able to configure the driver to use a specific GPU for OpenGL when Blender is running, but there's nothing in Blender that would do that for you.

$\endgroup$
4
  • $\begingroup$ Oh -- that's a very interesting (and surprising!) limitation of OpenGL; thanks for explaining. I guess I'll have to investigate workarounds. It seems that Windows 10 has no GPU pass-through (per reddit.com/r/virtualization/comments/mygyb7/…), but Ubuntu might (per mathiashueber.com/…), so maybe if I can switch OSes on this machine (to Ubuntu) I can build a VM that solves the problem. $\endgroup$ Oct 20, 2021 at 11:27
  • $\begingroup$ Alas, MSFT made Win 10 less useful in this way. You might be able to use the control panel to arrange the graphics settings for blender for a particular GPU, but you have to trick Win10 into it, because it only has generic labels, rather than specific GPU devices to pick from $\endgroup$ Oct 20, 2021 at 14:54
  • $\begingroup$ I wandered on this earlier, and it seems promising (and much simpler than rebooting into Ubuntu and setting up a GP-passthrough Windows VM, although that's my backup plan still): itechtics.com/use-specific-gpu If that's correct, it may work for me to just install two identical copies of the same version of Blender, and in each of them set this to a different GPU. Will test this later today, and maybe post a separate answer if it works (but leave yours as accepted, since it addresses the Blender-side of the question) $\endgroup$ Oct 20, 2021 at 16:09
  • $\begingroup$ I look forward to your answer. Because I only have two GPUs I can use the finessing trick but it would be nice to have a general solution. $\endgroup$ Oct 20, 2021 at 16:11
1
$\begingroup$

Given that this isn't functionality native to Blender (due to OpenGL limitations, and Eevee being written in OpenGL, per @MartyFouts answer), I started looking for workarounds. My initial thought was that I may need to switch into an OS that supports GPU Pass-Through, so that I could create a Virtual Machine but only provide it access to a specific GPU (which would not work in Windows 10, where I typically work on this PC, as only recent Windows Server editions seem to support this, per this brief Reddit thread).

Fortunately, it seems that selecting the preferred OpenGL GPU on a per-program basis is directly supported in Windows 10! Specifically, I am currently running Windows Home Edition, 64-bit, on the following version numbers, though hopefully this functionality won't be too version-dependent:

Major  Minor  Build  Revision
-----  -----  -----  --------
10     ​0      19042  0

In any case, I found I could:

  1. Install a second copy of Blender 2.83 (in a subfolder with a slightly different name)
  2. On this second copy of Blender, right-click'ing the Blender executable icon yielded this submenu: enter image description here
  3. On selecting the second of the two GPUs and launching an instance of this second copy of Blender (with an instance of my prior copy of Blender still running, and its OpenGL rendering GPU unchanged), I was then able to verify that, in Eeevee, (A) the original instance generates load on the first GPU, and (B) the second instance generates load on the second GPU, as hoped

These are just quick viewport tests so far; I'll have to do some actual renders and experiment with this further, but so far this seems like exactly what I was hoping was possible, surprisingly tucked away in a place in Windows I would not have expected to find it.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.