If I put two or more say 8800 GTX graphics cards on the same mainboard, can I call them individually through the API? So can I send one task to card 1 and another task to card 2 etc…?
What happens if I put 2 cards in SLI? Will the API see 1 card with twice the ALUs and twice the memory?
Yes, you can explicitly create a CUDA context on each GPU in the system to address them separately. CUDA does not support “SLI” in the graphics sense – that wouldn’t make sense.
If your application is highly parallel and can be divided into blocks that have no dependencies (and is not bottlenecked by PCI-express transfers), then using multiple GPUs can provide very good scaling.
As far as I understand, the global functions are called synchronously, and each this function can be called only on one device at the same time. So, do you mean that those “parallel” calls should be done by different CPU threads or maybe processes?
Yes, exactly. We recommend creating one CPU thread per Quadro GPU. In each thread, create a CUDA context (the CUDA runtime API enables you to enumerate the GPUs and choose one to create the context on).
Can I use runtime api, not the driver api to create a context?
I’m working in a cpu multithread environemnt and need switch the same context between multi-threads. I see the example to do this using driver API, can I do same thing using runtime API?
I think that’s not allowed with the runtime api. But you can use the GPUWorker class posted on these forums to deligate work to worker threads from a different thread. I’m not sure if you can have multiple threads submit work to the GPUWorker, but you could perhaps modify it to allow that.