Page 1 of 1
OpenCL vs CUDA
Posted: Sat Dec 15, 2018 11:18 pm
by Asgaroth
Hi All,
Just a simple question, when the FaH client supported CUDA did it use less CPU cycles to drive the GPU's? It seems that OpenCL hammers the CPU's to feed the GPU's. I do have the CPU slot removed so the client is not using my CPU's at all to crunch work units.
I've done a quick search to see if I could find this answered elsewhere but my google-fu has failed me.
Thanks
Re: OpenCL vs CUDA
Posted: Sun Dec 16, 2018 2:45 am
by JimboPalmer
Yes. CUDA is Nvidia only. Nvidia's OpenCL driver does a 'busy wait' on one CPU, busy waiting is almost always a poor design. AMD does not use a busy wait, so draws less CPU.
The Pande Group has limited funds so has focused on a single GPU model, OpenCL. In the past, they supported multiple cores based on vendor specific platforms but at some additional cost. (Funded by Nvidia and AMD?)
In some theoretical world with infinite funds and infinite programmer support, multiple cores written for every variation would yield faster results. As it is, we are stuck with Nvidia's poor design choice. (If they can force you to use CUDA software, they have a monopoly on hardware)
It is somewhat excusable when GPU folding is 100s of times more points than CPU folding.
https://en.wikipedia.org/wiki/Busy_waiting
(In a past life I had a busy wait I could not avoid, but I could run it on any CPU on my network. I used the slowest device I could find. ARM has a similar feature called big.LITTLE, but x86 does not)
Re: OpenCL vs CUDA
Posted: Sun Dec 16, 2018 10:43 am
by Asgaroth
Thanks for the reply, I was just wondering if there would ever be an opportunity for nvidia users to use cuda only thereby freeing up the cpu to feed more gpu's (for example, amd gpu's). Based on your response above this appears that it is unlikely to happen.
Re: OpenCL vs CUDA
Posted: Mon Dec 17, 2018 11:14 pm
by bruce
A busy-wait process is designed to waste CPU power in a way that improves response time ... the latter being an important consideration for gamers who detest the extra overhead required to interrupt another process to get attention by the CPU. While a busy-wait appears to use a lot of CPU cycles, it's easily interrupted by another process -- and no interruption is required to begin processing work assigned to the GPU driver processes.
Re: OpenCL vs CUDA
Posted: Mon Oct 03, 2022 6:28 am
by foldy
Now FAH has enabled CUDA on nvidia GPUs. But I see also one CPU core used by FAH to feed the GPU slot.
OpenMM has the option to use blocking sync instead of busy waiting. Can this be enabled by FAH user in the FahClient? How much does it hurt PPD?
UseBlockingSync: This is used to control how the CUDA runtime synchronizes between the CPU and GPU. If this is set to “true” (the default), CUDA will allow the calling thread to sleep while the GPU is performing a computation, allowing the CPU to do other work. If it is set to “false”, CUDA will spin-lock while the GPU is working.
https://github.com/openmm/openmm/blob/1 ... cifics.rst
Re: OpenCL vs CUDA
Posted: Tue Oct 04, 2022 9:31 am
by TheDevil
foldy wrote: ↑Mon Oct 03, 2022 6:28 am
Now FAH has enabled CUDA on nvidia GPUs. But I see also one CPU core used by FAH to feed the GPU slot.
OpenMM has the option to use blocking sync instead of busy waiting. Can this be enabled by FAH user in the FahClient? How much does it hurt PPD?
UseBlockingSync: This is used to control how the CUDA runtime synchronizes between the CPU and GPU. If this is set to “true” (the default), CUDA will allow the calling thread to sleep while the GPU is performing a computation, allowing the CPU to do other work. If it is set to “false”, CUDA will spin-lock while the GPU is working.
https://github.com/openmm/openmm/blob/1 ... cifics.rst
How do I enable Cuda?
Re: OpenCL vs CUDA
Posted: Tue Oct 04, 2022 10:26 am
by foldy
It is enabled automatically on Nvidia GPUs if supported. You see it in the logfile in FahControl
e.g.
06:17:57:WU00:FS01:0x22:Platform 2: OpenCL
06:17:57:WU00:FS01:0x22: opencl-device 0 specified
06:17:57:WU00:FS01:0x22:Platform 3: CUDA
06:17:57:WU00:FS01:0x22: cuda-device 0 specified
06:18:10:WU00:FS01:0x22:Attempting to create CUDA context:
06:18:10:WU00:FS01:0x22: Configuring platform CUDA
06:18:15:WU00:FS01:0x22: Using CUDA and gpu 0
Re: OpenCL vs CUDA
Posted: Tue Oct 04, 2022 2:41 pm
by Joe_H
TheDevil wrote: ↑Tue Oct 04, 2022 9:31 am
How do I enable Cuda?
As stated by foley, it is used automatically if you have a GPU that is compatible. CUDA is proprietary to Nvidia, and in compiling the GPU folding core the libraries and support in the drivers currently require a GPU using a Maxwell or later series chipset. That would be the GTX 745, 750, and GT(X) 900 series cards are the minimum for CUDA, the older GT 600 and 700 cards using Kepler chipsets will use OpenCL. There are some GT 600/700 cards using Fermi chips, those are no longer supported for folding at all as the Fermi chipset does not support OpenCL 1.2.