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.

Re: Folding@Home on M4 Mac Mini - 0 GPU cores?

Posted: Fri Mar 07, 2025 2:58 pm
by WesPerry
I can’t believe they still haven’t bent over backwards to implement Metal support. There are So Many Macs out there now with a ton of unused decent quality GPU’s idling now that we’re on the 4th Gen of the M series of processors. Probably close to 100 Million this year! Such a missed opportunity.

Re: Folding@Home on M4 Mac Mini - 0 GPU cores?

Posted: Fri Mar 07, 2025 3:24 pm
by muziqaz
WesPerry wrote: Fri Mar 07, 2025 2:58 pm I can’t believe they still haven’t bent over backwards to implement Metal support. There are So Many Macs out there now with a ton of unused decent quality GPU’s idling now that we’re on the 4th Gen of the M series of processors. Probably close to 100 Million this year! Such a missed opportunity.
Is it the same argument as we tend to have with mobile phones?
One would think you have so many Macs in the world, but to be honest they are still niche product with mobile first approach. Assigning development time to such a small market is not very wise however pationate someone might be

Re: Folding@Home on M4 Mac Mini - 0 GPU cores?

Posted: Sat Mar 08, 2025 2:49 pm
by WesPerry
Not the same argument at all. The vast majority of Macs spend most of their time plugged in and sitting on a desk, unlike phones. (And also have significantly more GPU compute at their disposal).

Re: Folding@Home on M4 Mac Mini - 0 GPU cores?

Posted: Sat Mar 08, 2025 2:50 pm
by muziqaz
WesPerry wrote: Sat Mar 08, 2025 2:49 pm Not the same argument at all. The vast majority of Macs spend most of their time plugged in and sitting on a desk, unlike phones. (And also have significantly more GPU compute at their disposal).
Most? You mean Mac minis with power constraint that of the mobile phone? Yeah, nah

Re: Folding@Home on M4 Mac Mini - 0 GPU cores?

Posted: Sat Mar 08, 2025 5:16 pm
by Joe_H
muziqaz wrote: Sat Mar 08, 2025 2:50 pm
WesPerry wrote: Sat Mar 08, 2025 2:49 pm Not the same argument at all. The vast majority of Macs spend most of their time plugged in and sitting on a desk, unlike phones. (And also have significantly more GPU compute at their disposal).
Most? You mean Mac minis with power constraint that of the mobile phone? Yeah, nah
Umm, No. The M series ARM chips used in the Mac mini do not have a power constraint anything like that of a mobile phone. Depending on the specific processor used the max power is in the 40 to 140 W range. They aren't Intel using much larger amounts of power for the same processing power. The Mac Mini also has the cooling to run at or near max continuously.

Now the issue with using the GPU cores is more of an issue of a long history of poor support from Apple. It started with a bug in the version of OpenCL distributed by Apple over a decade ago, that even with reports from F@h, BOINC, and other users of OpenCL for computing on GPUs was not fixed for about 2 years. Later Apple deprecated OpenCL in favor of Metal, but still has not issued any guidance as to when it would no longer be supported. Even with OpenCL deprecated and further development stopped with the release of macOS Mojave in 2018, it is "supported" and usable on the M series Mac GPU cores, but not on the CPU cores.

There are a lot of other issues with Apple GPU support besides the main ones I mentioned above. But the history of support, available GPUs on Apple hardware, uncertainty around OpenCL, and other events during the last decade plus all have led to limited development by F@h towards GPU folding. I do recall the early tests of Core_17 which included Macs, which were quickly ended when they ran into the OpenCL bug and could not program around it. The long delay before it was fixed, especially noticeable as Apple was the original source for OpenCL, ended up killing development for the OS. When it was fixed there were few usable GPUs still being installed on Mac hardware, the minority of Mac Pros wasn't enough to provide a usable base.