MacOS GPU

If you're new to FAH and need help getting started or you have very basic questions, start here.

Moderators: Site Moderators, FAHC Science Team

Joe_H
Site Admin
Posts: 7856
Joined: Tue Apr 21, 2009 4:41 pm
Hardware configuration: Mac Pro 2.8 quad 12 GB smp4
MacBook Pro 2.9 i7 8 GB smp2
Location: W. MA

Re: MacOS GPU

Post by Joe_H »

Here is what I know about driver support for AMD and nVidia GPU's on OS X:

Support for AMD GPU's is distributed with the OS. When a new Mac that has a discrete AMD GPU is sold, the OS that comes with it will support the GPU and possibly some others from the same generation. Later updates may include support for additional GPU's of the same generation and earlier if not already supported by the driver.

Since Apple last used nVidia as an OEM provider of GPU's a number of years ago, only support for Kepler and earlier cards is included in OS X as distributed by Apple. For Maxwell and Pascal based cards nVidia releases drivers that can be downloaded from their site. A specific download is required for each OS version and patch level (build number). I haven't checked to see if drivers for the 2000 series nVidia's have been repleased yet. I run a GTX 1060 on one of my OS X systems at home using these drivers.
MeeLee wrote:Not sure how MacOs runs Windows, and if Windows drivers would work from an emulation perspective.
There are some sites where users of Macs are running windows games through some sort of emulation, like Wine is to Linux.
I don't have a Mac.
In general, OS's such as Windows running in a VM or emulation do not have the necessary access to the GPU hardware to run F@h.

Person have run Windows or Linux directly on Mac hardware, that works quite well.
Image

iMac 2.8 i7 12 GB smp8, Mac Pro 2.8 quad 12 GB smp6
MacBook Pro 2.9 i7 8 GB smp3
bruce
Posts: 20910
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

Re: MacOS GPU

Post by bruce »

OK, let's review what we know.

FAH software consists of 3 major components

* FAHControl -- provides a GUI interface between the human and the other software components.
* FAHClient -- a back-end program that knows how to get a new assignment and return the finished results.
* FAHCore_?? -- an analysis program that processe the assigned Work Unit using the hardware on your system.

FAHClient also contains code that detects what supported hardware you have and informs the server so that it gets an assigned WU that you can process.
FAHCore_?? comes in several flavors, depending on what hardware is going to do the analysis.
The only FAHCore that's available on OS-X uses the CPU. The other software components are available.
... so a FAHCore to process work on your GTX 1060 would be required and it would need the support of drivers, including a functional version of OpenCL.

Does FAHClient report the presence of your GTX 1060 or is that detection software non-functional?
What version of OpenCL is available on your system? ... and does it work? (Note: There were a lot off non-functional versions of OpenCL on older versions of OS-X.)
How difficult would it be to port an existing FAHCore_?? from Linux so that it could work on OS-X with that GPU?
What percentage of the Macs have functional Fermi or AMD discrete GPU?
Will those machines be capable of dissipating the heat of the GPU running at a high computational loads for long periods of time?
Joe_H
Site Admin
Posts: 7856
Joined: Tue Apr 21, 2009 4:41 pm
Hardware configuration: Mac Pro 2.8 quad 12 GB smp4
MacBook Pro 2.9 i7 8 GB smp2
Location: W. MA

Re: MacOS GPU

Post by Joe_H »

Does FAHClient report the presence of your GTX 1060 or is that detection software non-functional?
Yes

What version of OpenCL is available on your system? ... and does it work? (Note: There were a lot off non-functional versions of OpenCL on older versions of OS-X.)
I would have to look up the OpenCl version number. Notes on the openmm.org site state that OpenCL is supported as of OS X 10.10.3 or higher, I assume that coincides with Apple fixing the bug that other notes list as being introduced as of 10.7.5. I am running OS X 10.12.6

How difficult would it be to port an existing FAHCore_?? from Linux so that it could work on OS-X with that GPU?
This I do not know. Many pieces of software from Linux backgrounds port relatively easily to OS X, but there are differences as OS X's lineage is from BSD4.3 via NextSTEP.

What percentage of the Macs have functional Fermi or AMD discrete GPU?
My estimate is less than 20%. How much less I don't know, that would require access to sales figures I do not have.

Will those machines be capable of dissipating the heat of the GPU running at a high computational loads for long periods of time?
For desktop machines, yes. Apple is very good at designing enclosures and cooling systems capable of removing heat, but to get maximum cooling may require overriding default fan speed settings. I would be less confident of current laptop designs being able to do so.
Image

iMac 2.8 i7 12 GB smp8, Mac Pro 2.8 quad 12 GB smp6
MacBook Pro 2.9 i7 8 GB smp3
bruce
Posts: 20910
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

Re: MacOS GPU

Post by bruce »

Analysis software should be easy to port to a different OS. The code doesn't change. Probably the only things that would matter are calls to system error detection software (and that is likely to be the same) and perhaps renaming the work files to conform to Apple's naming conventions rather than Linux's.

Finding somebody to do it is more of a problem than it should be, though ... and paying them, of course.
MeeLee
Posts: 1375
Joined: Tue Feb 19, 2019 10:16 pm

Re: MacOS GPU

Post by MeeLee »

Since MacOs is Unix based, the step from MacOs to FreeBSD (or any other Unix OS) is very small.
Or.. The step from FreeBSD(//Unix) to Apple would be very small.
There could be more support in the FreeBSD community than in the Apple community in generating code for Unix.
I'm just speculating here...

Though there are a lot of apple computers folding, they're mostly laptops; lower powered devices with older graphics cards.
Surely better than folding on CPU, but like mentioned before, it's the same with Intel IGPs.
Modern Intel IGPs (from Corei7 and i9) would probably outfold most Apple mobile GPUs, and are in larger supply; yet there are no drivers for that either.
SteveW928
Posts: 23
Joined: Fri Apr 26, 2019 8:19 pm
Hardware configuration: '18 Mac mini & Blackmagic eGPU (RX580)
Location: Victoria BC, Canada

Re: MacOS GPU

Post by SteveW928 »

I guess I would add another request for Mac F@H to support GPUs. There are more and more Mac users who are now adding eGPUs to their systems, even if the internal GPUs in most Macs wouldn't be up to the task.

I've contributed over 30M points to the project now over the years, and 20M of those have been in the last several months, when my Mac is running in Boot Camp with my eGPU. If I were able to also run the eGPU when I'm booted into macOS, I could contribute a good amount more.

I can't say how many people are in the situation I'm in, just that it will be increasing. Whether that is worth it to the project or not, I can't say. But, I'd sure like to be using more of my available computing power to contribute.

Regards, -Steve
micah_henning
Posts: 1
Joined: Fri Mar 13, 2020 6:58 pm

Re: MacOS GPU

Post by micah_henning »

Adding Folding@home support for GPUs on Macs could really help the cause. I use macOS 10.15 Catalina on a 2018 MacBook Pro 15" with a discrete Radeon Pro 560X. I'm able to train ML models with my GPU using Keras, PlaidML, and Metal. It's 2020. Loads of people, especially scientists and programmers, use Macs now. It's time. How can I help?
Leonardo
Posts: 261
Joined: Tue Dec 04, 2007 5:09 am
Hardware configuration: GPU slots on home-built, purpose-built PCs.
Location: Eagle River, Alaska

Re: MacOS GPU

Post by Leonardo »

Disclosure: I'm fluent with Windows and decent with Linux, but don't know much about any Apple OSes.

Can't you just throw in a second hard drive/SSD, install Linux or Windows under Bootcamp and boot to one of those? Or does your machine need to stay up in MacOS?
Image
SteveW928
Posts: 23
Joined: Fri Apr 26, 2019 8:19 pm
Hardware configuration: '18 Mac mini & Blackmagic eGPU (RX580)
Location: Victoria BC, Canada

Re: MacOS GPU

Post by SteveW928 »

Leonardo wrote:...
Can't you just throw in a second hard drive/SSD, install Linux or Windows under Bootcamp and boot to one of those? Or does your machine need to stay up in MacOS?
More the latter for me. I have my machine setup to boot Windows via Bootcamp (as you mentioned), and have contributed over 70M points that way, but I need to be in MacOS more these days, which means only CPU for now (which is slow-going, and not as beneficial the the project).
jlforester
Posts: 1
Joined: Mon Mar 16, 2020 12:37 am

Re: MacOS GPU

Post by jlforester »

Shame. I was getting ready to pull the trigger on an eGPU for my Mac Mini just for F@H
SteveW928
Posts: 23
Joined: Fri Apr 26, 2019 8:19 pm
Hardware configuration: '18 Mac mini & Blackmagic eGPU (RX580)
Location: Victoria BC, Canada

Re: MacOS GPU

Post by SteveW928 »

micah_henning wrote:Adding Folding@home support for GPUs on Macs could really help the cause. I use macOS 10.15 Catalina on a 2018 MacBook Pro 15" with a discrete Radeon Pro 560X. I'm able to train ML models with my GPU using Keras, PlaidML, and Metal. It's 2020. Loads of people, especially scientists and programmers, use Macs now. It's time. How can I help?
Part of the issue (from what I understand) is the number of Mac users who would actually be able to contribute, as a lot of Macs don't have discrete GPUs. But, I would imagine that number is slowly growing... and of course, how many of them would also be F@H folks.

The nice thing (as the comment just above points out) is that most modern Macs can now handle an eGPU, so if someone who uses a Mac decides they want to run F@H, they could ***ADD*** a discrete GPU to their setup (or several) and fold like crazy. :D

Of course that would get kind of expensive, but maybe they use it (them) for other purposes too, like it sounds like you do. I have mine for CAD/3D work.

The really nice thing about mine (Blackmagic eGPU) is that I can run it 100% 24/7 and it doesn't make any noise or even break a sweat. :lol:
DanGe
Posts: 118
Joined: Sat Nov 08, 2008 2:46 am
Hardware configuration: 2018 Mac Mini / MacOS Catalina
MSI Radeon RX Vega 56 (eGPU via Sonnet Breakaway Box 550)
3.2 GHz 6-Core Intel Core i7
Location: California, United States

Re: MacOS GPU

Post by DanGe »

I'll raise my hand as a data point. Recent Mac Mini, with a Vega 56 attached through a Sonnet Breakaway Box that is currently switched off. I would love to contribute my GPU to the COVID-19 frontline.

As I understand it, there have been a lot of technical limitations preventing Mac GPU support historically, such as all the shenanigans around bad OpenCL support (and now there's this whole Metal thing). I started looking into something like running FAH within a Docker container, but Docker for Mac depends on xhyve, which does not support GPU passthrough (understandably, it's complicated).

I don't know how much has changed in a year, but it seems pretty clear now that Apple has decided to bless only AMD GPUs. Maybe that simplifies things if we only need to worry about one hardware vendor? On the other hand, I think I read somewhere that FAH GPU support really benefits from the bandwidth of extra PCIe lanes, and, unfortunately, current eGPU setups (because of Thunderbolt 3 limitations) only support up to PCIe x4 (or even x2 depending on how you're using the eGPU).

(I recently found my 12-year-old forum account so I could post this. :D My hardware is so much better today, but I haven't yet decided whether it's really worth it for me to throw in just my 6-core CPU.)
JimboPalmer
Posts: 2573
Joined: Mon Feb 16, 2009 4:12 am
Location: Greenwood MS USA

Re: MacOS GPU

Post by JimboPalmer »

DanGe wrote:(I recently found my 12-year-old forum account so I could post this. :D My hardware is so much better today, but I haven't yet decided whether it's really worth it for me to throw in just my 6-core CPU.)
Yes.

Some problems work on monster proteins where the massive shader count of a modern GPU really helps, but there is no point to having more shaders than atoms in the molecule. So simpler proteins waste GPU resources and should be run on CPUs. (GPU folders really whine if the Protein is too small for a card they paid hundred$ for, and there are a LOT of CPUs available) I am not quite technical enough to understand why but some simulations need the more complex math a CPU can do, rather than a massive number of simple math processors in a GPU. At one point I thought I understood that a GPU had to consider the water a Protein was in as a continuous fluid, but CPUs could track each water molecules position individually. It is beyond me when that would be more accurate but it is cool to think about!

Any way, some problems work better on CPUs. And some problems really benefit from 4000 simple math units in a GPU.
Tsar of all the Rushers
I tried to remain childlike, all I achieved was childish.
A friend to those who want no friends
DanGe
Posts: 118
Joined: Sat Nov 08, 2008 2:46 am
Hardware configuration: 2018 Mac Mini / MacOS Catalina
MSI Radeon RX Vega 56 (eGPU via Sonnet Breakaway Box 550)
3.2 GHz 6-Core Intel Core i7
Location: California, United States

Re: MacOS GPU

Post by DanGe »

JimboPalmer wrote:Any way, some problems work better on CPUs. And some problems really benefit from 4000 simple math units in a GPU.
Neato. I just got the software up and running again, after nearly a whole decade.
rromanchuk
Posts: 2
Joined: Sun Mar 22, 2020 9:16 am

Re: MacOS GPU

Post by rromanchuk »

I want to give a little push back on this thread in 2020, just so newcomers have some context.

Every major (even smaller private projects) science project on boinc that offers GPU applications, also support native macos AMD and Nvidia GPUs builds, right out of the box. The only exception being GPUGRID.

amd/nvidia opencl binaries have been running successfully on macos, since at least 2017.
Post Reply