milc-qcd / milc_qcd

MILC collaboration code for lattice QCD calculations
Other
37 stars 32 forks source link

Feature/quda hisq fusion #23

Closed maddyscientist closed 5 years ago

maddyscientist commented 5 years ago

This pull requests adds robust support for mixed-precision multi-shift solves when MILC is used with QUDA.

Prior to pull, the per-pole tolerance for the shifted linear systems was set equal to zero, which results in excessive work being done on the shifted linear systems, and resulted in mixed-precision multi-shift not being a performant option. With this pull, instead we set the tolerance by scaling the zero tolerance according to the residue in order to keep the overall tolerance compatible. We apply this optimization to all of the force, heatbath and action evaluation.

This per pole tolerance setting is only deployed when MILC is plugged into QUDA. While beyond the scope of this pull request, this optimization could easily be applied to other multi-shift solver implementations on other platforms.

Some other features added in this pull include:

maddyscientist commented 5 years ago

@detar The open question for you, before you merge this, is whether the per pole tolerance setting should be enabled for a pure double precision solve. I imagine it would be good to keep the prior behaviour for regression testing? At the moment the optimization is applied regardless, but I can easily only apply this when used in the context of a multi-shift solver.

Thoughts?