# Multi-GPU support?

**URL:** <https://discourse.glfw.org/t/multi-gpu-support/75>\
**Category:** support\
**Created:** [June 25, 2014, 1:00pm UTC](https://discourse.glfw.org/t/multi-gpu-support/75 "2014-06-25T13:00:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [June 25, 2014, 1:00pm UTC](https://discourse.glfw.org/t/multi-gpu-support/75/1 "2014-06-25T13:00:20Z")

</div>

**[bonsaiscott](https://sourceforge.net/u/bonsaiscott/)** wrote on [Wednesday, June 25, 2014](https://sourceforge.net/p/glfw/discussion/247562/thread/b58b3a3b/#80e4):

I have a current application which I would like to add OpenGL rendering to. It has a main thread, which spawns N threads for computation. I will install N GPUs (2+) in the system where one GPU will have 2 displays (one for the ‘console’, the other for full-screen computation display), the others will have 1. Each compute thread would connect to its own GPU, create a context with a full-screen display on its attached monitor, and use OpenGL to render the results of its computation on its display.

Initially this is under Windows 7, but I need to migrate to Linux eventually. The GPUs are all GM107-based (GTX 750 ti) for now, but I do not wish to preclude the use of AMD devices if possible.

After reading the glfw documentation, I cannot see how to determine the connectivity of a monitor to a GPU, or a definitive statement that the above is possible. Is there a way? If not, is there another method outside the context of glfw to accomplish what I need to?

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [July 14, 2014, 2:42am UTC](https://discourse.glfw.org/t/multi-gpu-support/75/2 "2014-07-14T02:42:22Z")

</div>

**[gvnott](https://sourceforge.net/u/gvnott/)** wrote on [Monday, July 14, 2014](https://sourceforge.net/p/glfw/discussion/247562/thread/b58b3a3b/#0a57):

I don’t know if it is possible to do this with GLFW, though I do know both AMD and NVIDIA provide OpenGL Extensions to do this:  
[http://www.opengl.org/registry/specs/AMD/wgl\_gpu\_association.txt](http://www.opengl.org/registry/specs/AMD/wgl_gpu_association.txt)  
[http://www.opengl.org/registry/specs/AMD/glx\_gpu\_association.txt](http://www.opengl.org/registry/specs/AMD/glx_gpu_association.txt)  
[http://www.opengl.org/registry/specs/NV/gpu\_affinity.txt](http://www.opengl.org/registry/specs/NV/gpu_affinity.txt)

I believe you need a NVIDIA Qudro card to use the NVIDIA extensions. Also after a quick reed of both extensions it looks like you need to bind you OpenGL context to a GPU at runtime, you might need to modify GLFWs CreateWindow() function to get this behaviour.

Hope that helps 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [July 14, 2014, 3:32am UTC](https://discourse.glfw.org/t/multi-gpu-support/75/3 "2014-07-14T03:32:51Z")

</div>

**[gvnott](https://sourceforge.net/u/gvnott/)** wrote on [Monday, July 14, 2014](https://sourceforge.net/p/glfw/discussion/247562/thread/b58b3a3b/#73ff):

Or, now that I think of it, you could try using SLI to utilise all the GPUs in your system and something [like this](http://www.matrox.com/graphics/en/products/gxm/dh2go/digital_se/) to connect all the monitors you require.
