[RF] Remove the legacy evaluation backend - #23265
Draft
guitargeek wants to merge 3 commits into
Draft
Conversation
The probabilities returned by the RooFit::Evaluator are indexed by the original event indices, aligned with the weights that are obtained from RooAbsData::getWeightBatch(). Skipping zero-weight events when creating the data spans misaligns the two arrays, resulting in NaNs when evaluating the likelihood of a binned dataset with empty bins. Zero-weight events are already skipped in the summation loop, so don't skip them when creating the data spans. 🤖 Done with the help of AI
Remove the legacy evaluation backend for likelihood and chi-square fits.
It was superseded by the vectorized "cpu" backend, which is the default
since ROOT 6.32. After the removal of the constant term optimization,
the legacy backend also had no performance-relevant feature left that
would justify its continued maintenance.
Concretely, this means:
* RooFit::EvalBackend::Legacy() and the corresponding enum value are
removed. Passing RooFit::EvalBackend("legacy") to fitTo(),
createNLL(), chi2FitTo() or createChi2() now throws an exception,
and so does the deprecated RooFit::BatchMode("off").
* The implementation classes of the legacy test statistics are
removed: RooNLLVar, RooChi2Var, RooAbsOptTestStatistic and
RooAbsTestStatistic.
* The old multiprocessing mechanism of the legacy backend is removed
as well, consisting of the RooRealMPFE class and the underlying
BidirMMapPipe. The RooFit::NumCPU() command argument is now ignored
in fits; RooFit::Parallelize() based on RooFit::MultiProcess is the
replacement.
* The nll::name[pdf,data] and chi2::name[pdf,data] expressions in the
RooWorkspace::factory() language are removed, since they
instantiated the removed classes directly.
* RooFit::TestStatistics::RooUnbinnedL now always evaluates with the
RooFit::Evaluator, and its evalBackend constructor parameter
defaults to the "cpu" backend, like the NLLFactory.
* The roofit_legacy_eval_backend CMake option is gone, and the
xroofit package is now built unconditionally on non-MSVC platforms.
The tests that cross-checked the new backends against the legacy one
either compare against the "cpu" backend as the reference now (the chi2
cross-checks, which also probe for a usable CUDA device instead of
failing wholesale on machines without one), or are removed where their
only purpose was validating bit-by-bit agreement with the legacy
classes.
🤖 Done with the help of AI
Test Results 2 files 2 suites 5h 21m 14s ⏱️ Results for commit 462342d. |
The HS3 test suite has not updated its reference results to the new evaluation backend yet.
guitargeek
force-pushed
the
remove-legacy-eval-backend
branch
from
September 5, 2026 18:23
462342d to
7de1f04
Compare
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.
This is meant to be merged only in the 6.44 development cycle, following a deprecation that will be done in 6.42
The PR is already opened now so we can check possible blind spots with the new evaluation backends.