Skip to content

[RF] Show INFO messages on the FastEvaluations topic by default - #23193

Open
guitargeek wants to merge 2 commits into
root-project:masterfrom
guitargeek:fastevaluations-default-visible
Open

[RF] Show INFO messages on the FastEvaluations topic by default#23193
guitargeek wants to merge 2 commits into
root-project:masterfrom
guitargeek:fastevaluations-default-visible

Conversation

@guitargeek

Copy link
Copy Markdown
Contributor

The FastEvaluations messages inform the user that a class does not implement the batch evaluation interface (doEval()), falling back to scalar evaluate() calls. Since the vectorizing CPU backend is now the default for likelihood evaluations, this information is relevant to regular users with custom classes, and it helps tracing down remaining RooFit classes without a doEval() implementation (see the corresponding item in issue #6557). So far, the messages were effectively invisible: the topic was not part of any default stream, so nobody saw them unless they manually added a message stream.

Add the topic to the default INFO stream and update the stale class documentation to match the actual default stream configuration.

@guitargeek guitargeek self-assigned this Aug 30, 2026
@guitargeek
guitargeek requested a review from hageboeck as a code owner August 30, 2026 09:24
@github-actions

github-actions Bot commented Aug 30, 2026

Copy link
Copy Markdown

Test Results

    23 files      23 suites   3d 19h 7m 30s ⏱️
 3 869 tests  3 868 ✅ 0 💤 1 ❌
78 823 runs  78 822 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit 68743d2.

♻️ This comment has been updated with latest results.

The FastEvaluations topic hosts two messages that advise implementing a
faster evaluation interface for a class: one from the generic
RooAbsReal::doEval() implementation, which falls back to scalar
evaluate() calls in a loop, and one from RooFit::Evaluator, which
reports nodes that had to be evaluated on the CPU because their class
doesn't support CUDA. Both are emitted while the computation graph is
evaluated, e.g. in every minimizer iteration, so with the
FastEvaluations topic active a single fit would print them hundreds of
times.

Deduplicate both messages on the class name, such that each class is
reported exactly once. For the GPU message, this replaces the per-node
"hasLogged" guard, which only suppressed repetitions for a given node of
a given Evaluator and therefore still repeated the same advice for every
instance of a class in the computation graph, and again in every fit.
The flag is kept as a cheap guard so that the hot evaluation path
doesn't take the lookup more than once per node, and the message is
reworded to refer to the class instead of the individual argument.

As before, the messages are only emitted if the evaluated node is not a
scalar, because there would be no speedup benefit otherwise.

This is a prerequisite for making the FastEvaluations topic visible by
default.
The FastEvaluations messages inform the user that a class does not
implement the batch evaluation interface (doEval()), falling back to
scalar evaluate() calls. Since the vectorizing CPU backend is now the
default for likelihood evaluations, this information is relevant to
regular users with custom classes, and it helps tracing down remaining
RooFit classes without a doEval() implementation (see the corresponding
item in issue root-project#6557). So far, the messages were effectively invisible:
the topic was not part of any default stream, so nobody saw them unless
they manually added a message stream.

Add the topic to the default INFO stream and update the stale class
documentation to match the actual default stream configuration.
@guitargeek
guitargeek force-pushed the fastevaluations-default-visible branch from 0ff19a9 to 68743d2 Compare September 4, 2026 08:13
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