milc-qcd / milc_qcd

MILC collaboration code for lattice QCD calculations
Other
34 stars 33 forks source link

Allow QUDA to handle rephase calls #36

Closed mathiaswagner closed 4 years ago

mathiaswagner commented 4 years ago

This pull request depends on https://github.com/lattice/quda/pull/1018 being merged first.

It move the rephase(OFF)/(ON) calls for gauge_force and reunitarize into the calls of these functions and skips them for QUDA, so QUDA can take care of removing and applying staggered phases (assuming MILC staggered phase convention and antiperiodic bc).

This is needed to prevent touching the gauge field on the CPU for rephrasing and allows QUDA to keep the gauge field resident.

https://github.com/lattice/quda/pull/1019 adds a first step in this direction and reduces host-device data transfers.

https://github.com/lattice/quda/pull/1018 just adds the necessary calls to QUDA's MILC interface so that MILC can pass on information to QUDA whether phases are applied. This also leads to a small speedup as rephasing on the GPU is faster esp if it is done in places where the gauge field is needed on the GPU anyway and no additional device-host traffic is created.