Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Apple GPU Acceleration in Folding Client #303

Open
mreid-tt opened this issue Nov 5, 2024 · 5 comments
Open

Support for Apple GPU Acceleration in Folding Client #303

mreid-tt opened this issue Nov 5, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@mreid-tt
Copy link

mreid-tt commented Nov 5, 2024

I'm enthusiastic about contributing my machine's spare processing power to this project. Currently, I'm using Apple Silicon devices, and while the client works well for CPU-based folding, I wondered if there are any plans to leverage Apple GPUs. Adding support for Apple GPU acceleration could significantly boost folding performance and expand the power available to the community.

@muziqaz
Copy link
Contributor

muziqaz commented Nov 5, 2024

There are no plans to support Apple GPUs. This is because OpenMM, which FAH uses for GPU workloads, does not support Apple GPUs. They might be able to shed more light why that is, but rumour has it, that Apple is not forthcoming with providing support for OpenMM.

@mreid-tt
Copy link
Author

mreid-tt commented Nov 5, 2024

Thank you for the feedback and for highlighting OpenMM. I came across some discussions about drivers for Apple's Metal as well as support for OpenCL. Notably, OpenMM 8.0.0's release notes mention an improvement:

The OpenCL platform now has improved support for low end GPUs that don't support 64 bit atomic operations. That includes, for example, the embedded GPUs found in Intel and Apple processors. Previusly there were certain Forces that couldn't be used on those GPUs, such as CustomManyParticleForce and AmoebaMultipoleForce. All Forces are now fully supported on those processors. In addition, performance on them will often be better than before.

Unfortunately, this doesn’t resolve issues for current macOS users, as Apple’s Transition to Metal deprecates OpenCL for GPU computations as of macOS 10.14.

To ensure long-term compatibility, an Apple Metal implementation of OpenMM would be ideal. I noticed some discussions in Future of OSX GPU support, but much of it is complex, and any specific timeline remains unclear. It’s disappointing, especially since macOS has many CPU cores (twice as many as Windows) that underperform in contributions, as shown in OS statistics.

@mreid-tt
Copy link
Author

mreid-tt commented Nov 5, 2024

hey @muziqaz, I hope you don't mind but I asked the OpenMM folks about GPU support and based on their response in openmm/openmm#2489 (comment), it should be possible. Perhaps this could be something for the team to revisit?

@kbernhagen
Copy link
Contributor

I believe the main impediment right now is a failure of the client to get AMD PCI info for GPUs. You can see this in the debug build client log.

And Apple silicon GPUs are not PCI devices, so the current method of detecting and whitelisting those will not work. But for Apple silicon, it seems like it could be safe to always enable for OpenCL the GPU found using the OpenCL api. A core does its own thing to detect a GPU, I think.

@muziqaz
Copy link
Contributor

muziqaz commented Nov 6, 2024

I think due to lack of developer available time, relatively small and edge markets tend to go into back of the queue. The main priority right now in regards to the GPU folding is to sort out few issues with PC side and get AMD HIP out. After that it is possible we can ask to look into Apple GPU stuff

@jcoffland jcoffland added the enhancement New feature or request label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants