Page 1 of 1
Folding@Home on M4 Mac Mini - 0 GPU cores?
Posted: Sat Dec 21, 2024 10:55 pm
by kasdashdfjsah
Just installed Folding@Home on my brand new M4 Mac Mini, with 10 CPU and 10 GPU cores.
The 10 CPU cores work fine, but in the Folding@home client, it says 0 GPU cores, even though this should say 10.
Compared to Windows, and or Intel Macs do the CPU and GPU cores of the Apple Silicon ARM chips work together on 1 project, cause there does not seem to be an option to have only the CPU or only the GPU fold, like there is on Windows?
Hope somebody can help me out with this 0 GPU cores issue.
Re: Folding@Home on M4 Mac Mini - 0 GPU cores?
Posted: Sat Dec 21, 2024 11:06 pm
by calxalot
GPU folding is not supported on macOS.
Re: Folding@Home on M4 Mac Mini - 0 GPU cores?
Posted: Sun Dec 22, 2024 2:53 pm
by kasdashdfjsah
calxalot wrote: ↑Sat Dec 21, 2024 11:06 pm
GPU folding is not supported on macOS.
Any estimate on when it will be supported?
Re: Folding@Home on M4 Mac Mini - 0 GPU cores?
Posted: Sun Dec 22, 2024 8:43 pm
by PaulTV
The GPU folding cores support OpenCL for all GPUs and CUDA cores for Nvidia specifically. Apple does not provide (working) OpenCL support in their driver stack. GROMACS, which is the underlying mechanism used by the folding cores, added Mac GPU support (see
https://manual.gromacs.org/2024.2/relea ... ility.html), but (if this suffices for F@h) it'll require work to add and test this with folding cores; no idea if that's on the roadmap.
So there is progress, but I don't think there's any (public) ETA.
Re: Folding@Home on M4 Mac Mini - 0 GPU cores?
Posted: Sun Dec 22, 2024 8:52 pm
by kasdashdfjsah
Thanks for the detailed response, I appreciate it.
Re: Folding@Home on M4 Mac Mini - 0 GPU cores?
Posted: Sun Dec 22, 2024 9:09 pm
by Joe_H
I would just add a correction, Apple at one time had broken OpenCL support in the OS. That was reported by F@h and other computing projects, after about 2 years or so Apple did release fixed OpenCL support. This was about 10 years ago. By that point almost all of the older GPUs Apple had included in systems were no longer supported by F@h. Most Apple systems by that point either used Intel iGPUs for video that were not supported by F@h or were sold in small numbers - Mac Pros. Older Mac Pros could have a supported card installed, but that was not counted on as being common.
Also at some point in the last decade Apple deprecated use of OpenCL in favor of Metal. OpenCL is still supported and available, including on the Apple M-series GPUs but not the CPUs, but there have been a few bugs in some recent OS versions. Apple has not given any clear end date for OpenCL support. Metal is not supported at this time in OpenMM which the GPU folding cores are based on, I don''t know if there are any plans to add support. The uncertain status of OpenCL also is not the most conducive towards adding a port of the GPU folding cores to run on macOS. I do recall mention that some researcher had done a quick and dirty test to fold using OpenMM on a Mac system they had and it worked after the OpenCL bug fix, but that is the most I ever heard. That was on an Intel Mac, and I don't recall if they did further testing.
Re: Folding@Home on M4 Mac Mini - 0 GPU cores?
Posted: Sun Dec 22, 2024 9:18 pm
by calxalot
OpenMM supports OpenCL on Apple silicon, but as far as I know nobody has tried building and testing a fahcore using it. Further complication is that the client currently scans the pci bus for gpus. The Apple silicon GPU is not a pci device. So another method is needed to detect and whitelist such gpus.
Re: Folding@Home on M4 Mac Mini - 0 GPU cores?
Posted: Sun Dec 22, 2024 9:22 pm
by calxalot
There is a Metal plugin for OpenMM, but development stopped when the expected performance increase over OpenCL did not appear.
Re: Folding@Home on M4 Mac Mini - 0 GPU cores?
Posted: Wed Dec 25, 2024 8:22 pm
by kasdashdfjsah
Update
If I set my CPU core count utilization to only 4, matching my 4 performance cores, it is actually faster than using both my 4 P cores and 6 E cores together, I just learned of this, even though it makes no sense to me, it works.
Re: Folding@Home on M4 Mac Mini - 0 GPU cores?
Posted: Wed Dec 25, 2024 9:43 pm
by Joe_H
Yeah, that is one of the recommendations calxalot and I will usually make to use just as many threads as there are performance cores. The way a WU is divided up into multiple threads for processing involves a reconciliation step between the threads to account for forces between atoms in adjacent partitions. So processing gets limited by the slower threads. I understand some work is being done to make the underlying GROMACS code utilize mixed speed processing better, but that is not currently available.
Same issue shows up with processing F@h WUs on recent Intel processors with a mix of performance and economy cores. Depending on version of Windows processes for F@h may not stick to performance cores.