openfe icon indicating copy to clipboard operation
openfe copied to clipboard

Support HIP

Open mikemhenry opened this issue 1 year ago • 3 comments
trafficstars

Will use this PR to track what we need to support HIP. Related PRs and Issues: https://github.com/OpenFreeEnergy/openfe/issues/826 https://github.com/choderalab/openmmtools/pull/753

Checklist

  • [ ] Added a news entry

Developers certificate of origin

mikemhenry avatar Oct 08 '24 19:10 mikemhenry

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

mikemhenry avatar Oct 08 '24 19:10 mikemhenry

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Oct 08 '24 19:10 codecov[bot]

@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.

IAlibay avatar Oct 09 '24 21:10 IAlibay

@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.

mikemhenry avatar Oct 23 '24 22:10 mikemhenry

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

mikemhenry avatar Oct 29 '24 18:10 mikemhenry

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.

IAlibay avatar Oct 29 '24 18:10 IAlibay