GPU + CPU = ?

Moderators: Site Moderators, FAHC Science Team

Post Reply
Jesse_V
Site Moderator
Posts: 2851
Joined: Mon Jul 18, 2011 4:44 am
Hardware configuration: OS: Windows 10, Kubuntu 19.04
CPU: i7-6700k
GPU: GTX 970, GTX 1080 TI
RAM: 24 GB DDR4
Location: Western Washington

Re: GPU + CPU = ?

Post 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
F@h is now the top computing platform on the planet and nothing unites people like a dedicated fight against a common enemy. This virus affects all of us. Lets end it together.
P5-133XL
Posts: 2948
Joined: Sun Dec 02, 2007 4:36 am
Hardware configuration: Machine #1:

Intel Q9450; 2x2GB=8GB Ram; Gigabyte GA-X48-DS4 Motherboard; PC Power and Cooling Q750 PS; 2x GTX 460; Windows Server 2008 X64 (SP1).

Machine #2:

Intel Q6600; 2x2GB=4GB Ram; Gigabyte GA-X48-DS4 Motherboard; PC Power and Cooling Q750 PS; 2x GTX 460 video card; Windows 7 X64.

Machine 3:

Dell Dimension 8400, 3.2GHz P4 4x512GB Ram, Video card GTX 460, Windows 7 X32

I am currently folding just on the 5x GTX 460's for aprox. 70K PPD
Location: Salem. OR USA

Re: GPU + CPU = ?

Post 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.
Image
bruce
Posts: 20910
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

Re: GPU + CPU = ?

Post 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.
JimF
Posts: 652
Joined: Thu Jan 21, 2010 2:03 pm

Re: GPU + CPU = ?

Post 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.
Jesse_V
Site Moderator
Posts: 2851
Joined: Mon Jul 18, 2011 4:44 am
Hardware configuration: OS: Windows 10, Kubuntu 19.04
CPU: i7-6700k
GPU: GTX 970, GTX 1080 TI
RAM: 24 GB DDR4
Location: Western Washington

Re: GPU + CPU = ?

Post 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
F@h is now the top computing platform on the planet and nothing unites people like a dedicated fight against a common enemy. This virus affects all of us. Lets end it together.
bruce
Posts: 20910
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

Re: GPU + CPU = ?

Post by bruce »

Jesse_V wrote:...The client, for example, may need to be tweaked to account for the changes: https://fah-web.stanford.edu/projects/F ... icket/1013
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.
Post Reply