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 HIP #951

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Support HIP #951

wants to merge 4 commits into from

Conversation

mikemhenry
Copy link
Contributor

Will use this PR to track what we need to support HIP. Related PRs and Issues:
#826
choderalab/openmmtools#753

Checklist

  • Added a news entry

Developers certificate of origin

@mikemhenry
Copy link
Contributor Author

Will keep adding to this PR as needed, will also expand the news entry when the dust settles

Copy link

codecov bot commented Oct 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.64%. Comparing base (979676a) to head (5b5953b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #951      +/-   ##
==========================================
- Coverage   94.59%   91.64%   -2.95%     
==========================================
  Files         134      134              
  Lines        9935     9935              
==========================================
- Hits         9398     9105     -293     
- Misses        537      830     +293     
Flag Coverage Δ
fast-tests 91.64% <100.00%> (?)
slow-tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@IAlibay
Copy link
Member

IAlibay commented Oct 9, 2024

@mikemhenry do you want to add the allowable platforms list as a validator to the OpenmmEngineSettings class? I feel like we should document what we support somewhere, and it's probably as good a place to go "well you can do this but know that OpenCL and HIP aren't thoroughly validated.

@mikemhenry
Copy link
Contributor Author

@IAlibay that is a good point! I will add that and also add a note somewhere in the docs, maybe we need a page that is like "Using OpenFE in Production" where we list what we have heavily validated and also list tips for using it, like generating all the partial charges before running transformations.

@@ -50,7 +50,7 @@ def get_openmm_platform(platform_name=None):
platform.setPropertyDefaultValue(
'DeterministicForces', 'true')

if name != 'CUDA':
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to set DeterministicForces or Percision for HIP?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I was able to do that with the OpenMM API, but I need to test on a real GPU to see if it works (as in, setting those properties worked on my openMM HIP build but it could crash as soon as I try and run a MD step on the GPU)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an easy way to test this out? I.e. would spinning up an AWS runner that uses an AMD card work?

@mikemhenry
Copy link
Contributor Author

So we don't currently have any validators:

https://github.com/OpenFreeEnergy/openfe/blob/main/openfe/protocols/openmm_utils/omm_settings.py#L300-L313

A literal would be my preference -- users can deal with errors of using cuda instead of CUDA since the error happens as soon as they set the setting and not at simulation run time, BUT I do think this would be considered an API change. If I use a validator I can then at least use it to warn users if they choose an option that won't work or choose an option that isn't well validated

@IAlibay
Copy link
Member

IAlibay commented Oct 29, 2024

So we don't currently have any validators:

https://github.com/OpenFreeEnergy/openfe/blob/main/openfe/protocols/openmm_utils/omm_settings.py#L300-L313

A literal would be my preference -- users can deal with errors of using cuda instead of CUDA since the error happens as soon as they set the setting and not at simulation run time, BUT I do think this would be considered an API change. If I use a validator I can then at least use it to warn users if they choose an option that won't work or choose an option that isn't well validated

I personally would prefer it if it was a validator - mainly you get things like "OpenCL" | "opencl".
Using a literal is too strict, we just need the lowercase to match in the protocol.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants