#include <TritonClient.h>
Classes | |
struct | ServerSideStats |
Public Member Functions | |
TritonBatchMode | batchMode () const |
unsigned | batchSize () const |
void | reset () override |
void | resetBatchMode () |
TritonServerType | serverType () const |
void | setBatchMode (TritonBatchMode batchMode) |
bool | setBatchSize (unsigned bsize) |
void | setUseSharedMemory (bool useShm) |
TritonClient (const edm::ParameterSet ¶ms, const std::string &debugName) | |
bool | useSharedMemory () const |
bool | verbose () const |
~TritonClient () override | |
Public Member Functions inherited from SonicClient< TritonInputMap, TritonOutputMap > | |
SonicClient (const edm::ParameterSet ¶ms, const std::string &debugName, const std::string &clientName) | |
Public Member Functions inherited from SonicClientBase | |
const std::string & | clientName () const |
const std::string & | debugName () const |
virtual void | dispatch (edm::WaitingTaskWithArenaHolder holder) |
virtual void | dispatch () |
SonicMode | mode () const |
SonicClientBase (const edm::ParameterSet ¶ms, const std::string &debugName, const std::string &clientName) | |
virtual | ~SonicClientBase ()=default |
Public Member Functions inherited from SonicClientTypes< TritonInputMap, TritonOutputMap > | |
Input & | input () |
const Output & | output () const |
virtual | ~SonicClientTypes ()=default |
Static Public Member Functions | |
static void | fillPSetDescription (edm::ParameterSetDescription &iDesc) |
Static Public Member Functions inherited from SonicClientBase | |
static void | fillBasePSetDescription (edm::ParameterSetDescription &desc, bool allowRetry=true) |
Protected Member Functions | |
void | evaluate () override |
void | getResults (const std::vector< std::shared_ptr< triton::client::InferResult >> &results) |
inference::ModelStatistics | getServerSideStatus () const |
template<typename F > | |
bool | handle_exception (F &&call) |
unsigned | nEntries () const |
bool | noOuterDim () const |
unsigned | outerDim () const |
void | reportServerSideStats (const ServerSideStats &stats) const |
ServerSideStats | summarizeServerStats (const inference::ModelStatistics &start_status, const inference::ModelStatistics &end_status) const |
Protected Member Functions inherited from SonicClientBase | |
void | finish (bool success, std::exception_ptr eptr=std::exception_ptr{}) |
void | setMode (SonicMode mode) |
void | start (edm::WaitingTaskWithArenaHolder holder) |
void | start () |
Protected Attributes | |
TritonBatchMode | batchMode_ |
std::unique_ptr< triton::client::InferenceServerGrpcClient > | client_ |
grpc_compression_algorithm | compressionAlgo_ |
triton::client::Headers | headers_ |
bool | manualBatchMode_ |
unsigned | maxOuterDim_ |
unsigned | nEntries_ |
bool | noOuterDim_ |
std::vector< triton::client::InferOptions > | options_ |
unsigned | outerDim_ |
TritonServerType | serverType_ |
bool | useSharedMemory_ |
bool | verbose_ |
Protected Attributes inherited from SonicClientBase | |
unsigned | allowedTries_ |
std::string | clientName_ |
std::string | debugName_ |
std::unique_ptr< SonicDispatcher > | dispatcher_ |
std::string | fullDebugName_ |
std::optional< edm::WaitingTaskWithArenaHolder > | holder_ |
SonicMode | mode_ |
unsigned | tries_ |
bool | verbose_ |
Protected Attributes inherited from SonicClientTypes< TritonInputMap, TritonOutputMap > | |
Input | input_ |
Output | output_ |
Private Member Functions | |
void | addEntry (unsigned entry) |
auto | client () |
void | resizeEntries (unsigned entry) |
Private Attributes | |
friend | TritonInputData |
friend | TritonOutputData |
Additional Inherited Members | |
Public Types inherited from SonicClientTypes< TritonInputMap, TritonOutputMap > | |
typedef TritonInputMap | Input |
typedef TritonOutputMap | Output |
Definition at line 21 of file TritonClient.h.
TritonClient::TritonClient | ( | const edm::ParameterSet & | params, |
const std::string & | debugName | ||
) |
Definition at line 55 of file TritonClient.cc.
References a, client_, SonicClientBase::fullDebugName_, edm::FileInPath::fullPath(), SonicClientTypes< TritonInputMap, TritonOutputMap >::input_, submitPVResolutionJobs::key, LocalCPU, SiStripPI::max, maxOuterDim_, mps_check::msg, noOuterDim_, heppy_report::oname, options_, SonicClientTypes< TritonInputMap, TritonOutputMap >::output_, submitPVValidationJobs::params, TritonService::pid(), triton_utils::printColl(), Rectangular, contentValuesFiles::server, TritonService::serverInfo(), serverType_, setBatchSize(), SonicClientBase::setMode(), AlCaHLTBitMon_QueryRunRegistry::string, summarizeEdmComparisonLogfiles::success, Sync, TRITON_THROW_IF_ERROR, heppy_batch::val, and verbose_.
|
override |
Definition at line 221 of file TritonClient.cc.
References SonicClientTypes< TritonInputMap, TritonOutputMap >::input_, and SonicClientTypes< TritonInputMap, TritonOutputMap >::output_.
|
private |
Definition at line 281 of file TritonClient.cc.
References batchMode_, mps_splice::entry, SonicClientTypes< TritonInputMap, TritonOutputMap >::input_, outerDim_, SonicClientTypes< TritonInputMap, TritonOutputMap >::output_, and Ragged.
Referenced by resizeEntries().
|
inline |
unsigned TritonClient::batchSize | ( | ) | const |
Definition at line 246 of file TritonClient.cc.
References batchMode_, nEntries(), outerDim_, and Rectangular.
Referenced by TritonData< IO >::allocate(), evaluate(), TritonData< IO >::fromServer(), setBatchMode(), and TritonData< IO >::toServer().
|
inlineprivate |
Definition at line 93 of file TritonClient.h.
References client_.
Referenced by TritonData< IO >::client().
|
overrideprotectedvirtual |
Implements SonicClientBase.
Definition at line 348 of file TritonClient.cc.
References Async, batchSize(), client_, compressionAlgo_, SonicClientBase::finish(), getResults(), getServerSideStatus(), handle_exception(), headers_, mps_fire::i, ALPAKA_ACCELERATOR_NAMESPACE::caPixelDoublets::if(), SonicClientTypes< TritonInputMap, TritonOutputMap >::input(), SonicClientTypes< TritonInputMap, TritonOutputMap >::input_, SonicClientBase::mode_, nEntries(), heppy_report::oname, options_, SonicClientTypes< TritonInputMap, TritonOutputMap >::output_, reportServerSideStats(), mysort::results, dqmMemoryStats::stats, summarizeEdmComparisonLogfiles::success, summarizeServerStats(), TRITON_THROW_IF_ERROR, and verbose().
|
static |
Definition at line 543 of file TritonClient.cc.
References edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addUntracked(), SonicClientBase::fillBasePSetDescription(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by DeepTauIdSonicProducer::fillDescriptions(), DeepMETSonicProducer::fillDescriptions(), ParticleNetSonicJetTagsProducer::fillDescriptions(), SCEnergyCorrectorDRNProducer::fillDescriptions(), and DRNCorrectionProducerT< T >::fillDescriptions().
|
protected |
Definition at line 325 of file TritonClient.cc.
References mps_fire::i, noOuterDim_, heppy_report::oname, SonicClientTypes< TritonInputMap, TritonOutputMap >::output_, mps_fire::result, mysort::results, and TRITON_THROW_IF_ERROR.
Referenced by evaluate().
|
protected |
Definition at line 532 of file TritonClient.cc.
References client_, options_, TRITON_THROW_IF_ERROR, and verbose_.
Referenced by evaluate().
|
protected |
Definition at line 306 of file TritonClient.cc.
References CMS_SA_ALLOW, MillePedeFileConverter_cfg::e, and SonicClientBase::finish().
Referenced by evaluate().
|
protected |
Definition at line 244 of file TritonClient.cc.
References SonicClientTypes< TritonInputMap, TritonOutputMap >::input_.
Referenced by batchSize(), evaluate(), and resizeEntries().
|
inlineprotected |
Definition at line 57 of file TritonClient.h.
References noOuterDim_.
Referenced by TritonData< IO >::fullLoc(), and TritonData< IO >::toServer().
|
inlineprotected |
Definition at line 58 of file TritonClient.h.
References outerDim_.
Referenced by TritonData< IO >::computeSizes(), TritonData< IO >::fromServer(), and TritonData< IO >::toServer().
|
protected |
Definition at line 474 of file TritonClient.cc.
References ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), submitPVResolutionJobs::count, SonicClientBase::debugName_, SonicClientBase::fullDebugName_, mps_check::msg, and dqmMemoryStats::stats.
Referenced by evaluate().
|
overridevirtual |
Reimplemented from SonicClientBase.
Definition at line 294 of file TritonClient.cc.
References batchMode_, SonicClientTypes< TritonInputMap, TritonOutputMap >::input_, manualBatchMode_, SonicClientTypes< TritonInputMap, TritonOutputMap >::output_, and Rectangular.
void TritonClient::resetBatchMode | ( | ) |
Definition at line 239 of file TritonClient.cc.
References batchMode_, manualBatchMode_, and Rectangular.
|
private |
Definition at line 267 of file TritonClient.cc.
References addEntry(), mps_splice::entry, SonicClientTypes< TritonInputMap, TritonOutputMap >::input_, nEntries(), and SonicClientTypes< TritonInputMap, TritonOutputMap >::output_.
Referenced by setBatchSize().
|
inline |
Definition at line 50 of file TritonClient.h.
References serverType_.
Referenced by TritonData< IO >::updateMem().
void TritonClient::setBatchMode | ( | TritonBatchMode | batchMode | ) |
Definition at line 230 of file TritonClient.cc.
References batchMode(), batchMode_, batchSize(), manualBatchMode_, and setBatchSize().
bool TritonClient::setBatchSize | ( | unsigned | bsize | ) |
Definition at line 248 of file TritonClient.cc.
References batchMode_, SonicClientBase::fullDebugName_, maxOuterDim_, SiStripPI::min, outerDim_, Rectangular, and resizeEntries().
Referenced by setBatchMode(), and TritonClient().
|
inline |
|
protected |
Definition at line 511 of file TritonClient.cc.
References TritonClient::ServerSideStats::compute_infer_time_ns_, TritonClient::ServerSideStats::compute_input_time_ns_, TritonClient::ServerSideStats::compute_output_time_ns_, TritonClient::ServerSideStats::cumm_time_ns_, TritonClient::ServerSideStats::execution_count_, TritonClient::ServerSideStats::inference_count_, TritonClient::ServerSideStats::queue_time_ns_, and TritonClient::ServerSideStats::success_count_.
Referenced by evaluate().
|
inline |
|
inline |
|
protected |
Definition at line 76 of file TritonClient.h.
Referenced by addEntry(), batchMode(), batchSize(), reset(), resetBatchMode(), setBatchMode(), and setBatchSize().
|
protected |
Definition at line 84 of file TritonClient.h.
Referenced by client(), evaluate(), getServerSideStatus(), and TritonClient().
|
protected |
Definition at line 81 of file TritonClient.h.
Referenced by evaluate().
|
protected |
Definition at line 82 of file TritonClient.h.
Referenced by evaluate().
|
protected |
Definition at line 77 of file TritonClient.h.
Referenced by reset(), resetBatchMode(), and setBatchMode().
|
protected |
Definition at line 72 of file TritonClient.h.
Referenced by setBatchSize(), and TritonClient().
|
protected |
Definition at line 75 of file TritonClient.h.
|
protected |
Definition at line 74 of file TritonClient.h.
Referenced by getResults(), noOuterDim(), and TritonClient().
|
protected |
Definition at line 86 of file TritonClient.h.
Referenced by batchmanager.BatchManager::CheckBatchScript(), evaluate(), getServerSideStatus(), batchmanager.BatchManager::ManageOutputDir(), batchmanager.BatchManager::ParseOptions(), batchmanager.BatchManager::SubmitJob(), batchmanager.BatchManager::SubmitJobs(), and TritonClient().
|
protected |
Definition at line 73 of file TritonClient.h.
Referenced by addEntry(), batchSize(), outerDim(), and setBatchSize().
|
protected |
Definition at line 80 of file TritonClient.h.
Referenced by serverType(), and TritonClient().
|
private |
Definition at line 89 of file TritonClient.h.
|
private |
Definition at line 90 of file TritonClient.h.
|
protected |
Definition at line 79 of file TritonClient.h.
Referenced by setUseSharedMemory(), and useSharedMemory().
|
protected |
Definition at line 78 of file TritonClient.h.
Referenced by getServerSideStatus(), TritonClient(), and verbose().