Multiple GPUs with Cuda Thrust?

How to use Thrust with multiple GPUs? Is it just a matter of using cudaSetDevice (deviceId) and then running the appropriate Thrust code?

+4
source share
1 answer

With CUDA 4.0 or later, cudaSetDevice(deviceId) , followed by your draft code, should work.

Just keep in mind that you will need to create and work with separate vectors on each device (if you do not have devices that support access to peer memory and PCI-Express bandwidth, enough for your task).

+5
source

Source: https://habr.com/ru/post/1383350/


All Articles