Skip to content

[RF] Don't do dirty state propagation if more than 2 params changed#20044

Closed
guitargeek wants to merge 1 commit intoroot-project:masterfrom
guitargeek:roofit_recompute_all
Closed

[RF] Don't do dirty state propagation if more than 2 params changed#20044
guitargeek wants to merge 1 commit intoroot-project:masterfrom
guitargeek:roofit_recompute_all

Conversation

@guitargeek
Copy link
Copy Markdown
Contributor

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.

@guitargeek guitargeek self-assigned this Oct 6, 2025
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Oct 6, 2025

Test Results

    21 files      21 suites   3d 14h 54m 27s ⏱️
 3 779 tests  3 766 ✅ 0 💤  13 ❌
75 491 runs  75 347 ✅ 0 💤 144 ❌

For more details on these failures, see this check.

Results for commit 6a874b4.

♻️ This comment has been updated with latest results.

@guitargeek guitargeek force-pushed the roofit_recompute_all branch from bfc76c8 to 40a3dcd Compare October 18, 2025 17:30
@guitargeek
Copy link
Copy Markdown
Contributor Author

@guitargeek guitargeek closed this Feb 26, 2026
@guitargeek guitargeek deleted the roofit_recompute_all branch February 26, 2026 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant