-
Notifications
You must be signed in to change notification settings - Fork 47
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
automatic tuning of (QUDA)-MG parameters [WIP, DO NOT MERGE] #537
base: master
Are you sure you want to change the base?
Conversation
…rmionic derivative
The preliminary idea for the input is as follows but this has to be fine-tuned depending how the algorithm will turn out in the end:
There may be some adaptive process added to dynamically reduce the search space if certain parameter changes don't affect the tts. |
…ks down when the solver does not converge at any point...)
I will probably change the input format such that one doesn't specify min/max and a number of steps but a "delta" for each parameter and level and a number of steps that this delta should be applied for The current "algorithm" (I use the word very cautiously) can start with a completely useless setup which doesn't converge and finds something which does. Unfortunately, it doesn't yet find a better minimum than I can find by hand. However, I've tested this only on small lattices (16c32 and 24c48, albeit at the physical point) and I suspect that it will work better on larger lattices. |
Funnily enough, this actually works and seems to find parameter sets that I would have never considered. For example, on cA211.12.48, this is a parameter set that it evolves to:
|
…hen the tuning direction is changed or the outer iteration of the tuning loop is reset
First experience on a large volume (64c128) at the physical point suggests that this tuner, surprisingly, really seems to work. Setting
and starting from
the tuner takes the solver from non-convergence through a successful solve in around 9 seconds (on Meluxina)
down to a solve in 2.5 seconds with parameters that I would not have thought to choose by hand:
|
Using these parameters in practice and comparing between the "hand-tuned" setup on the left and the auto-tuned setup on the right:
I seem to obtain very stable timings so far (red is the auto-tuned MG setup): |
Doing the same on a L=48 simulation at the physical point similarly leads to a very nice improvement. Below, The two "peaks" correspond to inversions related to The final setup is:
|
note to self from meeting just now: it should be possible to integrate this directly in the HMC
|
… the MG autotuner (default 5 per-mille)
…ased on current experience
…etup was actually able to make the problem converge
a279261
to
bb1c8bf
Compare
… iterations, prevent parameters going negative when tuning with negative delta
…sion: this seems to help with MPI errors (truncated messages)
started work on a simple algorithm to automatically tune the (QUDA)-MG parameters which can be tuned without rebuilding the setup