Page 1 of 1
Re: GPU + CPU = ?
Posted: Thu Apr 18, 2013 5:54 am
by Jesse_V
Adam A. Wanderer wrote:The GPU and CPU programs seem to be going in different directions. Is there any way to allow the GPU and CPU to work together on problems they can't quite handle alone?
Thanks.
The programming for them is quite different, and each piece of hardware is good at certain things.
The last I heard about them working together was
http://folding.typepad.com/news/2012/02 ... n-fah.html
Re: GPU + CPU = ?
Posted: Thu Apr 18, 2013 6:40 am
by P5-133XL
Look at
FAHBench as a potential example of where things could be going. It uses OpenCL with Core_17. If you want to play and have the correct Intel OpenCL drivers you can run FAHBench on the CPU or your GPU. If you want to really go far-out then you can run it in command line mode to get it to run SMP GPU or even potentially SMP GPU+CPU.
My point is that really GPU and CPU's are not necessarily going in different directions but with the right software abstractions CPU and GPU folding could end up in the exact same place. At the current moment the software isn't there and scaling is a big problem but who knows what the future holds.
Re: GPU + CPU = ?
Posted: Thu Apr 18, 2013 3:03 pm
by bruce
It's possible, but rather unlikely.
Suppose you're the programmer who has to figure out what percentage of the work should be assigned to the CPU and what percentage should be assigned to the GPU. Assuming you get it just right, what happens when somebody upgrades their GPU and now it only works at 50% because it's waiting for the CPU to finish its share of the work? Across the variety of hardware FAH runs on, there's a VERY WIDE variation in relative speed of the CPU and the GPU. SMP, itself, already doesn't do well when the resources available to all of the threads is unbalanced.
Also at the present time, people seem very dissatisfied when a GPU core uses some of the CPU resources.
It's not impossible, but there would be some very challenging obstacles to make it work well on more than exactly one hardware configuration so my prediction is that we won't see PG developing anything like that.
Re: GPU + CPU = ?
Posted: Thu Apr 18, 2013 4:32 pm
by JimF
bruce wrote:Also at the present time, people seem very dissatisfied when a GPU core uses some of the CPU resources.
That may just be for historical reasons at FAH, where CUDA uses very little CPU power. But a lot of the BOINC projects use OpenCL, and it is fairly common to have to reserve a CPU core (whether all of it is used or not) to get the GPU to run properly, which means both fast enough and with no errors. And with the multi-core CPUs with 8 virtual cores available, it is not so much of a big deal. So I think that if it is necessary to get the job done, then most Folders will be willing to supply the cores, though that is just my guess.
Re: GPU + CPU = ?
Posted: Thu Apr 18, 2013 4:44 pm
by Jesse_V
JimF wrote:bruce wrote:Also at the present time, people seem very dissatisfied when a GPU core uses some of the CPU resources.
That may just be for historical reasons at FAH, where CUDA uses very little CPU power. But a lot of the BOINC projects use OpenCL, and it is fairly common to have to reserve a CPU core (whether all of it is used or not) to get the GPU to run properly, which means both fast enough and with no errors. And with the multi-core CPUs with 8 virtual cores available, it is not so much of a big deal. So I think that if it is necessary to get the job done, then most Folders will be willing to supply the cores, though that is just my guess.
That makes sense. I'm not going to name any names, but certain groups of PPD-chasing people are not exactly pleased with the change, even if the move to OpenCL is an big advantage scientifically speaking. But you're right, most of us can adapt, and it's not a big deal. The client, for example, may need to be tweaked to account for the changes:
https://fah-web.stanford.edu/projects/F ... icket/1013
Re: GPU + CPU = ?
Posted: Sat Apr 20, 2013 3:49 am
by bruce
The client has nothing to do with it. The drivers decide whether to use CPU time when waiting for the gpu to reply or not.