multi-gpu setup?

Hey all,

if I were to have a 2 GPU setup (with or without SLI/Crossfire), how would that improve OF Code?
I currently assume that OF uses only the GPU of the screen that is used to draw the context? (eg run the code on a screen connected to the second GPU; it would use that GPU?)

The idea is to use 1 card for resolume and projector outputs.
The OF/processing sketches should run on the second GPU, piping their output using the main memory from OF to resolume. I think we cannot use syphon due to different gpu’s.

or would it be more easy to have a second pc system that pipes the output to the resolume computer using a 1/10 GBit network? (I can write plugins for both OF & resolume to do this)

Idea’s/suggestios/experience?

Thanks!

Is this something opencl/cuda can deal with? As I understand it, its aware of what resources it has (e.g. multiple gpus) and can farm out work appropriately

CUDA does seem to support this: http://docs.nvidia.com/cuda/cuda-samples/index.html#simple-peer-to-peer-transfers-with-multi-gpu

Getting it set up properly could very well be hellish though :slight_smile:

Thanks for the answers! It seems a bit cumbersome though :slight_smile:

Would it be possible to run OF sketches solely on the secondary (or 3rd/4th?) gpu (with the first gpu begin used to render a 3840 * 1080 input + additional effects using resolume).

If you had one GL context in one thread and a second in another thread you could copy data between CPU threads using ofFbo::readToPixels(), but I don’t think the performance would be real great.

This link suggests that the above might work, with some serious messing around with the window initialization: http://gpuray.blogspot.com/2010/01/cuda-multi-gpu-textures.html

This is another approach: https://developer.nvidia.com/gpudirect

thanks, very interesting, i’ll have a look!