LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "TritonClient.h"
Classes | |
struct | ServerSideStats |
Public Member Functions | |
TritonClient (const fhicl::ParameterSet ¶ms) | |
TritonInputMap & | input () |
const TritonOutputMap & | output () const |
unsigned | batchSize () const |
bool | verbose () const |
bool | setBatchSize (unsigned bsize) |
void | dispatch () |
void | reset () |
Protected Member Functions | |
bool | getResults (std::shared_ptr< nic::InferResult > results) |
void | start () |
void | evaluate () |
void | finish (bool success) |
void | reportServerSideStats (const ServerSideStats &stats) const |
ServerSideStats | summarizeServerStats (const inference::ModelStatistics &start_status, const inference::ModelStatistics &end_status) const |
inference::ModelStatistics | getServerSideStatus () const |
Protected Attributes | |
TritonInputMap | input_ |
TritonOutputMap | output_ |
unsigned | allowedTries_ |
unsigned | tries_ |
std::string | serverURL_ |
unsigned | maxBatchSize_ |
unsigned | batchSize_ |
bool | noBatch_ |
bool | verbose_ |
std::vector< nic::InferInput * > | inputsTriton_ |
std::vector< const nic::InferRequestedOutput * > | outputsTriton_ |
std::unique_ptr< nic::InferenceServerGrpcClient > | client_ |
nic::InferOptions | options_ |
Definition at line 20 of file TritonClient.h.
lartriton::TritonClient::TritonClient | ( | const fhicl::ParameterSet & | params | ) |
Definition at line 25 of file TritonClient.cc.
References client_, fhicl::ParameterSet::get(), input_, inputsTriton_, maxBatchSize_, MF_LOG_INFO, noBatch_, options_, output_, outputsTriton_, triton_utils::printColl(), serverURL_, setBatchSize(), triton_utils::throwIfError(), and verbose_.
|
inline |
Definition at line 39 of file TritonClient.h.
|
inline |
Definition at line 44 of file TritonClient.h.
|
protected |
Definition at line 194 of file TritonClient.cc.
References batchSize_, client_, finish(), getResults(), getServerSideStatus(), inputsTriton_, MF_LOG_DEBUG, options_, outputsTriton_, reportServerSideStats(), summarizeServerStats(), t1, t2, verbose(), and triton_utils::warnIfError().
Referenced by finish().
|
protected |
Definition at line 233 of file TritonClient.cc.
References allowedTries_, evaluate(), and tries_.
Referenced by evaluate().
|
protected |
Definition at line 169 of file TritonClient.cc.
References output(), output_, and triton_utils::warnIfError().
Referenced by evaluate().
|
protected |
Definition at line 313 of file TritonClient.cc.
References client_, options_, verbose_, and triton_utils::warnIfError().
Referenced by evaluate().
|
inline |
Definition at line 37 of file TritonClient.h.
|
inline |
|
protected |
Definition at line 250 of file TritonClient.cc.
References lartriton::TritonClient::ServerSideStats::compute_infer_time_ns_, lartriton::TritonClient::ServerSideStats::compute_input_time_ns_, lartriton::TritonClient::ServerSideStats::compute_output_time_ns_, lartriton::TritonClient::ServerSideStats::cumm_time_ns_, lartriton::TritonClient::ServerSideStats::execution_count_, lartriton::TritonClient::ServerSideStats::inference_count_, MF_LOG_DEBUG, lartriton::TritonClient::ServerSideStats::queue_time_ns_, and lartriton::TritonClient::ServerSideStats::success_count_.
Referenced by evaluate().
void lartriton::TritonClient::reset | ( | ) |
bool lartriton::TritonClient::setBatchSize | ( | unsigned | bsize | ) |
Definition at line 140 of file TritonClient.cc.
References batchSize_, input_, maxBatchSize_, MF_LOG_WARNING, and output_.
Referenced by TritonClient().
|
protected |
|
protected |
Definition at line 289 of file TritonClient.cc.
References lartriton::TritonClient::ServerSideStats::compute_infer_time_ns_, lartriton::TritonClient::ServerSideStats::compute_input_time_ns_, lartriton::TritonClient::ServerSideStats::compute_output_time_ns_, lartriton::TritonClient::ServerSideStats::cumm_time_ns_, lartriton::TritonClient::ServerSideStats::execution_count_, lartriton::TritonClient::ServerSideStats::inference_count_, lartriton::TritonClient::ServerSideStats::queue_time_ns_, and lartriton::TritonClient::ServerSideStats::success_count_.
Referenced by evaluate().
|
inline |
|
protected |
Definition at line 70 of file TritonClient.h.
Referenced by finish().
|
protected |
Definition at line 73 of file TritonClient.h.
Referenced by evaluate(), and setBatchSize().
|
protected |
Definition at line 81 of file TritonClient.h.
Referenced by evaluate(), getServerSideStatus(), and TritonClient().
|
protected |
Definition at line 68 of file TritonClient.h.
Referenced by reset(), setBatchSize(), and TritonClient().
|
protected |
Definition at line 78 of file TritonClient.h.
Referenced by evaluate(), and TritonClient().
|
protected |
Definition at line 72 of file TritonClient.h.
Referenced by setBatchSize(), and TritonClient().
|
protected |
Definition at line 74 of file TritonClient.h.
Referenced by TritonClient().
|
protected |
Definition at line 83 of file TritonClient.h.
Referenced by evaluate(), getServerSideStatus(), and TritonClient().
|
protected |
Definition at line 69 of file TritonClient.h.
Referenced by getResults(), reset(), setBatchSize(), and TritonClient().
|
protected |
Definition at line 79 of file TritonClient.h.
Referenced by evaluate(), and TritonClient().
|
protected |
Definition at line 71 of file TritonClient.h.
Referenced by TritonClient().
|
protected |
Definition at line 70 of file TritonClient.h.
|
protected |
Definition at line 75 of file TritonClient.h.
Referenced by getServerSideStatus(), and TritonClient().