Base of the GPU data reduction algorithms.
More...
#include <ReducerAlgo.hh>
Inherited by Drp::Gpu::CuSZpReducer, Drp::Gpu::CuSzReducer, Drp::Gpu::EipReducer, Drp::Gpu::LcReducer, Drp::Gpu::NoOpReducer, Drp::Gpu::PfplReducer, and Drp::Gpu::SleekReducer.
|
| | ReducerAlgo (const Parameters ¶, const MemPoolGpu &pool, Detector &det) |
| | Keep references to the parameters, the memory pool and the detector.
|
| |
| virtual | ~ReducerAlgo () |
| | Does nothing; empty virtual destructor.
|
| |
| virtual bool | hasGraph () const =0 |
| | Pure virtual: return true if the algorithm is recorded into a CUDA graph with recordGraph().
|
| |
| virtual size_t | payloadSize () const =0 |
| | Pure virtual: return the largest reduced data size in bytes; Reducer sizes the reduce buffers from it, raising it to maxTrSize less the datagram header if that is larger.
|
| |
| virtual void | recordGraph (cudaStream_t stream, unsigned *const state, unsigned *const index, float const *const calibBuffers, size_t const calibBufsCnt, uint8_t *const dataBuffers, size_t const dataBufsCnt)=0 |
| | Pure virtual: record into stream, which is being captured, the kernels that reduce calibrated buffer *index (calibBufsCnt floats each) into data buffer *index (dataBufsCnt bytes each).
|
| |
| virtual void | reduce (cudaGraphExec_t, cudaStream_t, unsigned index, size_t *dataSize, unsigned *retCode)=0 |
| | Pure virtual: run the reduction of buffer index on stream (launching graph if the algorithm uses one) and return the reduced size and an error code through dataSize and retCode, possibly by asynchronous copies on stream.
|
| |
| virtual int | configure (const nlohmann::json &configureMsg, const nlohmann::json &connectMsg, size_t collectionId)=0 |
| | Pure virtual: configure the algorithm from the Configure and Connect messages (per the code comment, the configDb configuration); return non-zero on failure.
|
| |
| virtual unsigned | configure (XtcData::Xtc &, const void *bufEnd)=0 |
| | Pure virtual: add the names (descriptions) of the reduced data to xtc, without going past bufEnd (per the code comment); return non-zero on failure.
|
| |
| virtual void | event (XtcData::Xtc &, const void *bufEnd, unsigned dataSize) |
| | Describe dataSize of reduced data in the event xtc (per the code comment, fill the xtc data description); does nothing in this base class.
|
| |
Base of the GPU data reduction algorithms.
Each one is built as a shared library whose name is lib, the reducer kwarg and .so; Reducer loads it and calls createReducer() once per worker.
◆ ReducerAlgo()
Keep references to the parameters, the memory pool and the detector.
◆ ~ReducerAlgo()
| virtual Drp::Gpu::ReducerAlgo::~ReducerAlgo |
( |
| ) |
|
|
inlinevirtual |
Does nothing; empty virtual destructor.
◆ configure() [1/2]
| virtual int Drp::Gpu::ReducerAlgo::configure |
( |
const nlohmann::json & |
configureMsg, |
|
|
const nlohmann::json & |
connectMsg, |
|
|
size_t |
collectionId |
|
) |
| |
|
pure virtual |
◆ configure() [2/2]
| virtual unsigned Drp::Gpu::ReducerAlgo::configure |
( |
XtcData::Xtc & |
, |
|
|
const void * |
bufEnd |
|
) |
| |
|
pure virtual |
◆ event()
| virtual void Drp::Gpu::ReducerAlgo::event |
( |
XtcData::Xtc & |
, |
|
|
const void * |
bufEnd, |
|
|
unsigned |
dataSize |
|
) |
| |
|
inlinevirtual |
◆ hasGraph()
| virtual bool Drp::Gpu::ReducerAlgo::hasGraph |
( |
| ) |
const |
|
pure virtual |
◆ payloadSize()
| virtual size_t Drp::Gpu::ReducerAlgo::payloadSize |
( |
| ) |
const |
|
pure virtual |
◆ recordGraph()
| virtual void Drp::Gpu::ReducerAlgo::recordGraph |
( |
cudaStream_t |
stream, |
|
|
unsigned *const |
state, |
|
|
unsigned *const |
index, |
|
|
float const *const |
calibBuffers, |
|
|
size_t const |
calibBufsCnt, |
|
|
uint8_t *const |
dataBuffers, |
|
|
size_t const |
dataBufsCnt |
|
) |
| |
|
pure virtual |
Pure virtual: record into stream, which is being captured, the kernels that reduce calibrated buffer *index (calibBufsCnt floats each) into data buffer *index (dataBufsCnt bytes each).
As NoOpReducer and the Reducer kernels show, the kernels act when *state is 1, store the reduced size in the size_t just before the data, and set *state to 2.
Implemented in Drp::Gpu::CuSZpReducer, Drp::Gpu::CuSzReducer, Drp::Gpu::EipReducer, Drp::Gpu::NoOpReducer, Drp::Gpu::PfplReducer, Drp::Gpu::SleekReducer, and Drp::Gpu::LcReducer.
◆ reduce()
| virtual void Drp::Gpu::ReducerAlgo::reduce |
( |
cudaGraphExec_t |
, |
|
|
cudaStream_t |
, |
|
|
unsigned |
index, |
|
|
size_t * |
dataSize, |
|
|
unsigned * |
retCode |
|
) |
| |
|
pure virtual |
◆ m_det
◆ m_para
◆ m_pool
The documentation for this class was generated from the following file: