wgbljl

Using two Devices in parallel with one CPU thread?

Discussion created by wgbljl on Mar 24, 2009
Latest reply on Mar 24, 2009 by wgbljl

I am using two Firestream GPU in my system. The problem is how to use these two GPUs in parallel. The pseudo code is like this:

The single GPU version:
for (...)  {
    //the length of the output stream is L
    kernel(...);
}

The double GPU version:
for (...)  {
    //the length of the output stream is L/2
    useDevices(0); //use the first GPU
    kernel(...);

    //the length of the output stream is L/2
    useDevices(1); //use the second GPU
    kernel(...);
}

Because the task for each GPU in the second version reduced to half of the that in the first version. I thought the time with two GPUs should be almost half of the time with single GPU.  But the fact is that they are nearly the same. BTW, I'm using one CPU thread to control two GPUs.

Outcomes