[RF] Don't do dirty state propagation if more than 2 params changed#20044
Closed
guitargeek wants to merge 1 commit intoroot-project:masterfrom
Closed
[RF] Don't do dirty state propagation if more than 2 params changed#20044guitargeek wants to merge 1 commit intoroot-project:masterfrom
guitargeek wants to merge 1 commit intoroot-project:masterfrom
Conversation
Test Results 21 files 21 suites 3d 14h 54m 27s ⏱️ For more details on these failures, see this check. Results for commit 6a874b4. ♻️ This comment has been updated with latest results. |
bfc76c8 to
40a3dcd
Compare
40a3dcd to
6a874b4
Compare
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The "dirty state propagation" is the mechanism that figures out which parts of the computation graph need to be re-evaluated.
It can be quite expensive if all the parameters in the model are changed at once, for example in the Minuit 2 line search step.
Changing only 1 or 2 parameters is common during numerical differentiation. But in the minimizer algorithms like Minuit 2, we can generally assume that if more than 2 parameter changed, then all of them are changed. Therefore, we should implement some mechanism that skips the dirty flag propagation in that case. This will greatly speed up fits with many parameters, especially when using AD, where the line search dominates the runtime. For ATLAS Higgs combinations, a speedup of 2x for minimization is expected.
To make some initial studies, this draft PR is opened with a relatively hacky way to implement this, using global state in RooFit.