Skip to content

Commit 02c5b75

Browse files
ferdymercuryguitargeek
authored andcommitted
[skip-ci] cpu backend specify it's single threaded
See root-project#17344
1 parent 5ea78e5 commit 02c5b75

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

roofit/roofitcore/src/RooAbsPdf.cxx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ double RooAbsPdf::extendedTerm(RooAbsData const& data, bool weightSquared, bool
832832
* \f]
833833
* <tr><td> `Range(double lo, double hi)` <td> Fit only data inside given range. A range named "fit" is created on the fly on all observables.
834834
* <tr><td> `SumCoefRange(const char* name)` <td> Set the range in which to interpret the coefficients of RooAddPdf components
835-
* <tr><td> `NumCPU(int num, int istrat)` <td> Parallelize NLL calculation on num CPUs
835+
* <tr><td> `NumCPU(int num, int istrat)` <td> Parallelize NLL calculation on num CPUs. (Currently, this setting is ignored with the **cpu** Backend.)
836836
* <table>
837837
* <tr><th> Strategy <th> Effect
838838
* <tr><td> 0 = RooFit::BulkPartition - *default* <td> Divide events in N equal chunks
@@ -851,10 +851,10 @@ double RooAbsPdf::extendedTerm(RooAbsData const& data, bool weightSquared, bool
851851
* <tr><td> `EvalBackend(std::string const&)` <td> Choose a likelihood evaluation backend:
852852
* <table>
853853
* <tr><th> Backend <th> Description
854-
* <tr><td> **cpu** - *default* <td> New vectorized evaluation mode, using faster math functions and auto-vectorisation.
854+
* <tr><td> **cpu** - *default* <td> New vectorized evaluation mode, using faster math functions and auto-vectorisation (currently on a single thread).
855855
* Since ROOT 6.23, this is the default if `EvalBackend()` is not passed, succeeding the **legacy** backend.
856856
* If all RooAbsArg objects in the model support vectorized evaluation,
857-
* likelihood computations are 2 to 10 times faster than with the **legacy** backend
857+
* likelihood computations are 2 to 10 times faster than with the **legacy** backend (each on a single thread).
858858
* - unless your dataset is so small that the vectorization is not worth it.
859859
* The relative difference of the single log-likelihoods with respect to the legacy mode is usually better than \f$10^{-12}\f$,
860860
* and for fit parameters it's usually better than \f$10^{-6}\f$. In past ROOT releases, this backend could be activated with the now deprecated `BatchMode()` option.
@@ -864,6 +864,7 @@ double RooAbsPdf::extendedTerm(RooAbsData const& data, bool weightSquared, bool
864864
* This backend can drastically speed up the fit if all RooAbsArg object in the model support it.
865865
* <tr><td> **legacy** <td> The original likelihood evaluation method.
866866
* Evaluates the PDF for each single data entry at a time before summing the negative log probabilities.
867+
* It supports multi-threading, but you might need more than 20 threads to maybe see about 10% performance gain over the default cpu-backend (that runs currently only on a single thread).
867868
* <tr><td> **codegen** <td> **Experimental** - Generates and compiles minimal C++ code for the NLL on-the-fly and wraps it in the returned RooAbsReal.
868869
* Also generates and compiles the code for the gradient using Automatic Differentiation (AD) with [Clad](https://github.com/vgvassilev/clad).
869870
* This analytic gradient is passed to the minimizer, which can result in significant speedups for many-parameter fits,

0 commit comments

Comments
 (0)