openforcefield / openff-evaluator

A physical property evaluation toolkit from the Open Forcefield Consortium.
https://docs.openforcefield.org/projects/evaluator
MIT License
55 stars 18 forks source link

Adding OpenCL support for dask scheduling #424

Closed ocmadin closed 1 year ago

ocmadin commented 2 years ago

We've recently (thanks to @mrshirts) got access to some AMD GPUs which would be useful to run evaluator on. After talking with @mattwthompson, it seems like evaluator's interaction with OpenMM supports OpenCL: https://github.com/openforcefield/openff-evaluator/blob/18962755f7663c37430d2baffb6c9bd80bd0556c/openff/evaluator/utils/openmm.py#L63-L68

However, Evaluator currently does not support using OpenCL when scheduling jobs with dask: https://github.com/openforcefield/openff-evaluator/blob/21da54363009d83110b54d57e4416ae31df3868b/openff/evaluator/backends/dask.py#L299-L308

Is it possible to add support for using Evaluator with OpenCL? This is not a particularly time-sensitive ask, but would be good to have in the future.

jeff231li commented 2 years ago

@ocmadin, this should be a small edit to the codebase, and I have played around running evaluator with OpenCL in the past. I'll create a PR for this.

jchodera commented 2 years ago

Rather than hard-coding the platform, what about using the fastest available platform that supports the desired precision? We have a utility in openmmtools to help with this.

jeff231li commented 2 years ago

@jchodera the utility in openmmtools looks great! I'll incorporate this into Evaluator to automatically determine the best possible platform but also give the user the option to override the default.

mattwthompson commented 2 years ago

A small update - this is in the 0.4.x line via #465. It is included in the 0.4.0rc3 builds, which should be online within the hour. It's also expected to be in the full release if all goes well.

mattwthompson commented 1 year ago

In release 0.4.0 via #465 - thanks Jeff!