Page 1 of 1

What are the technical differences between CPU & GPU WUs

PostPosted: Thu Apr 09, 2020 4:58 pm
by NoMoreQuarantine
Like the title says, I'm curious why WUs are divided into distinct CPU & GPU categories. Is it to play to their particular strengths; are there things that only one can handle, but not the other; or some other reason?

Edit: Prediction after thinking about it, GPU WUs probably contain the rendering components of the simulations (AKA, lots of 3D matrix arithmetic). The previous eliminates the CPU as the tool for the job, but what about the other direction, what if anything makes the CPU WUs more suited to CPUs?

Re: What are the technical differences between CPU & GPU WUs

PostPosted: Thu Apr 09, 2020 5:21 pm
by bruce
They use different hardware in your computer.

Computers all have CPUs which are general purpose processors. A GPU is a specialized piece of equipment designed to compute images and is has superior 3D computing capabilities. Older computers and laptops may not even have a GPU, using what was originally called a VGA.

The software designed to compute with them is decidedly different so the WUs are different. The slowest GPU has about the same compute capabilies as the CPU and the high powered GPUs (typically used to make games very fast) may be 100X as fast.

Re: What are the technical differences between CPU & GPU WUs

PostPosted: Thu Apr 09, 2020 5:29 pm
by NoMoreQuarantine
Thanks for the response bruce. What you said lines up pretty well with my assumptions, so that's gratifying :)

Re: What are the technical differences between CPU & GPU WUs

PostPosted: Thu Apr 09, 2020 6:40 pm
by JimboPalmer
Hardware

CPUs have Floating Point math units that do the Brute Force computing but they also have sophisticated logic to make subtle decisions.

A typical CPU may have 8 cores each of which has 4 wide SIMD units. (min 1, max 256)
https://en.wikipedia.org/wiki/SIMD

GPUs are way more powerful, but considerably less sophisticated. They may have 5000 cores, but with limited logic. Due to their huge size they tend have slower clock speeds.

https://en.wikipedia.org/wiki/General-p ... sing_units


Software

CPUs currently use the GROMACS algorithm in an a7 core.

GPUs use OpenMM on top of OpenCL in an older core 21 or a newer core 22.

https://en.wikipedia.org/wiki/GROMACS
https://en.wikipedia.org/wiki/Molecular ... ng_on_GPUs
https://en.wikipedia.org/wiki/OpenCL

Re: What are the technical differences between CPU & GPU WUs

PostPosted: Thu Apr 09, 2020 7:31 pm
by NoMoreQuarantine
Thank you for providing an explanation and additional reading JimboPalmer.

Re: What are the technical differences between CPU & GPU WUs

PostPosted: Fri Apr 10, 2020 9:48 pm
by JimF
JimboPalmer wrote:GPUs use OpenMM on top of OpenCL in an older core 21 or a newer core 22.

I hope they have not forgotten about CUDA. Maybe after this mad rush is over (if ever), they can get around to it.

Re: What are the technical differences between CPU & GPU WUs

PostPosted: Fri Apr 10, 2020 11:13 pm
by Frogging101
JimF wrote:
JimboPalmer wrote:GPUs use OpenMM on top of OpenCL in an older core 21 or a newer core 22.

I hope they have not forgotten about CUDA. Maybe after this mad rush is over (if ever), they can get around to it.


CUDA is just nVidia's proprietary API for GPU Compute. OpenCL works just as well and has broader platform compatibility due to it being an open standard.

Re: What are the technical differences between CPU & GPU WUs

PostPosted: Fri Apr 10, 2020 11:42 pm
by JimF
Frogging101 wrote:CUDA is just nVidia's proprietary API for GPU Compute. OpenCL works just as well and has broader platform compatibility due to it being an open standard.

I will let others take you apart on that one. It is more than I can bear just to think about it.

Re: What are the technical differences between CPU & GPU WUs

PostPosted: Sat Apr 11, 2020 12:19 am
by Frogging101
JimF wrote:
Frogging101 wrote:CUDA is just nVidia's proprietary API for GPU Compute. OpenCL works just as well and has broader platform compatibility due to it being an open standard.

I will let others take you apart on that one. It is more than I can bear just to think about it.


I don't know what you're trying to say. The OpenCL and CUDA APIs are just two different ways of programming the same thing. The latter is only supported by nVidia.

Re: What are the technical differences between CPU & GPU WUs

PostPosted: Sat Apr 11, 2020 12:29 am
by JimboPalmer
[This is a rant, it is only a rant, in the event of real discussion, I will shut up. All my GPUs are Nvidia, the last AMD GPU I used was a HD 2600 Pro on Core_11]

In the bad old days, F@H had to have one Core for AMD and one Core for Nvidia. The Nvidia Core used very optimized CUDA. (optimized for Fermi, I bet) This locked you into Nvidia cards in the future.
This double the amount of work the programmer had to do, and made it challenging to add features to F@H, while keeping both Cores in sync.

At some point, (2008) Nvidia grudgingly made a emulation layer of OpenCL on top of CUDA. It was the clunkiest, (it uses polled I/O so consumes an entire CPU thread needlessly) wimpiest (Nvidia has been on version 1.2 for 5 years, the current specification is 2.2. AMD is on version 2.0) version possible just so Nvidia can claim to support the standard. Nvidia still very much wants you to use CUDA, so they continue to sell Nvida GPUs.

AMD abandoned their proprietary interfaces for OpenCL and so has no reason to code their version poorly.

Sadly, Apple has depreciated OpenCL, so it would be foolhardy to write a GPU Core for Macs knowing that it won't last.

So yes, a CUDA core would be faster, but that is (at least in part) because Nvidia has crippled their implementation of OpenCL.

[/Rant]

Re: What are the technical differences between CPU & GPU WUs

PostPosted: Sat Apr 11, 2020 12:59 pm
by PantherX
JimF wrote:
JimboPalmer wrote:GPUs use OpenMM on top of OpenCL in an older core 21 or a newer core 22.

I hope they have not forgotten about CUDA. Maybe after this mad rush is over (if ever), they can get around to it.

You may want to go and buy a lottery ticket :P

Disclaimer, the information below is obtained while under development which means that numbers, values and time may change once it is in production.
There's a CUDA version of FahCore_22 in development, not ETA yet but that's a great start: https://www.reddit.com/r/pcmasterrace/c ... s/fkylryx/
Performance of CUDA FahCore_22 is up to 50% more (did you read my disclaimer?): https://www.reddit.com/r/pcmasterrace/c ... s/fkyjt9d/
AMD is not left behind and there's a chance that ROCm will be supported (really happy that you read my disclaimer): https://www.reddit.com/r/pcmasterrace/c ... s/fkyrqpp/

Re: What are the technical differences between CPU & GPU WUs

PostPosted: Sat Apr 11, 2020 1:44 pm
by Neil-B
:!: :!: Did anyone not spot the disclaimer? :!: :!: :D

Re: What are the technical differences between CPU & GPU WUs

PostPosted: Sat Apr 11, 2020 2:07 pm
by NoMoreQuarantine
PantherX wrote:Disclaimer, the information below is obtained while under development which means that numbers, values and time may change once it is in production.
There's a CUDA version of FahCore_22 in development, not ETA yet but that's a great start: https://www.reddit.com/r/pcmasterrace/c ... s/fkylryx/
Performance of CUDA FahCore_22 is up to 50% more (did you read my disclaimer?): https://www.reddit.com/r/pcmasterrace/c ... s/fkyjt9d/
AMD is not left behind and there's a chance that ROCm will be supported (really happy that you read my disclaimer): https://www.reddit.com/r/pcmasterrace/c ... s/fkyrqpp/


It's great to hear that 50% improved CUDA performance and ROCm support have been officially and categorically confirmed. What was that about a disclaimer though? :wink:

Re: What are the technical differences between CPU & GPU WUs

PostPosted: Sat Apr 11, 2020 3:06 pm
by PantherX
NoMoreQuarantine wrote:...What was that about a disclaimer though? :wink:

It was to ensure that that none of the information above should be taken for granted... drivers can change, pirorities can shift. If you're reading this, you have really good eyesight or have mastered copy/paste :P

Re: What are the technical differences between CPU & GPU WUs

PostPosted: Fri Apr 17, 2020 10:09 pm
by zexmaxwell
If you want a demonstration of GPU / CPU

https://youtu.be/-P28LKWTzrI