Definition at line 39 of file RooFitDriver.h.
#include </home/sftnight/build/workspace/root-makedoc-v626/rootspi/rdoc/src/v6-26-00-patches/roofit/roofitcore/res/RooFitDriver.h>
◆ DataSpansMap
◆ RooFitDriver()
Construct a new RooFitDriver.
The constructor analyzes and saves metadata about the graph, useful for the evaluation of it that will be done later. In case the CUDA mode is selected, there's also some CUDA-related initialization.
- Parameters
-
[in] | absReal | The RooAbsReal object that sits on top of the computation graph that we want to evaluate. |
[in] | normSet | Normalization set for the evaluation |
[in] | batchMode | The computation mode, accepted values are RooBatchCompute::Cpu and RooBatchCompute::Cuda . |
Definition at line 111 of file RooFitDriver.cxx.
◆ ~RooFitDriver()
RooFitDriver::~RooFitDriver |
( |
| ) |
|
◆ assignToGPU()
Assign a node to be computed in the GPU.
Scan it's clients and also assign them in case they only depend on gpu nodes.
Definition at line 457 of file RooFitDriver.cxx.
◆ computeCPUNode()
◆ determineOutputSizes()
void RooFitDriver::determineOutputSizes |
( |
| ) |
|
|
private |
◆ getVal()
double RooFitDriver::getVal |
( |
| ) |
|
Returns the value of the top node in the computation graph.
Definition at line 338 of file RooFitDriver.cxx.
◆ getValHeterogeneous()
double RooFitDriver::getValHeterogeneous |
( |
| ) |
|
|
private |
Returns the value of the top node in the computation graph.
Definition at line 376 of file RooFitDriver.cxx.
◆ getValues()
std::vector< double > RooFitDriver::getValues |
( |
| ) |
|
◆ markGPUNodes()
void RooFitDriver::markGPUNodes |
( |
| ) |
|
|
private |
Decides which nodes are assigned to the gpu in a cuda fit.
In the 1st iteration, everything is computed in cpu for measuring the cpu time. In the 2nd iteration, everything is computed in gpu (if possible) to measure the gpu time. In the 3rd iteration, simulate the computation of the graph by calling simulateFit with every distinct threshold found as timeDiff within the nodes of the graph and select the best configuration. In the end, mark the nodes and handle the details accordingly.
Definition at line 619 of file RooFitDriver.cxx.
◆ setData() [1/2]
◆ setData() [2/2]
void RooFitDriver::setData |
( |
RooAbsData const & |
data, |
|
|
std::string_view |
rangeName = "" , |
|
|
RooAbsCategory const * |
indexCatForSplitting = nullptr , |
|
|
bool |
skipZeroWeights = false , |
|
|
bool |
takeGlobalObservablesFromData = true |
|
) |
| |
◆ setOperMode()
◆ simulateFit()
std::chrono::microseconds RooFitDriver::simulateFit |
( |
std::chrono::microseconds |
h2dTime, |
|
|
std::chrono::microseconds |
d2hTime, |
|
|
std::chrono::microseconds |
diffThreshold |
|
) |
| |
|
private |
This methods simulates the computation of the whole graph and the time it takes and decides what to compute in gpu.
The decision is made on the basis of avoiding leaving either the gpu or the cpu idle at any time, if possible, and on assigning to each piece of hardware a computation that is significantly slower on the other part. The nodes may be assigned to the non-efficient side (cpu or gpu) to prevent idleness only if the absolute difference cpuTime-cudaTime does not exceed the diffThreshold.
Definition at line 497 of file RooFitDriver.cxx.
◆ topNode()
◆ _batchMode
◆ _bufferManager
◆ _changeOperModeRAIIs
◆ _cudaMemDataset
double* ROOT::Experimental::RooFitDriver::_cudaMemDataset = nullptr |
|
private |
◆ _dataMapCPU
◆ _dataMapCUDA
◆ _getValInvocations
int ROOT::Experimental::RooFitDriver::_getValInvocations = 0 |
|
private |
◆ _integralUnfolder
◆ _nodes
std::vector<NodeInfo> ROOT::Experimental::RooFitDriver::_nodes |
|
private |
◆ _vectorBuffers
std::stack<std::vector<double> > ROOT::Experimental::RooFitDriver::_vectorBuffers |
|
private |
roofit/roofitcore/res/RooFitDriver.h
roofit/roofitcore/src/RooFitDriver.cxx