CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
TritonClient Class Reference

#include <TritonClient.h>

Inheritance diagram for TritonClient:
SonicClient< TritonInputMap, TritonOutputMap > SonicClientBase SonicClientTypes< TritonInputMap, TritonOutputMap >

Classes

struct  ServerSideStats
 

Public Member Functions

unsigned batchSize () const
 
void reset () override
 
bool setBatchSize (unsigned bsize)
 
 TritonClient (const edm::ParameterSet &params)
 
bool verbose () const
 
- Public Member Functions inherited from SonicClient< TritonInputMap, TritonOutputMap >
 SonicClient (const edm::ParameterSet &params)
 
- Public Member Functions inherited from SonicClientBase
const std::string & clientName () const
 
const std::string & debugName () const
 
virtual void dispatch ()
 
virtual void dispatch (edm::WaitingTaskWithArenaHolder holder)
 
SonicMode mode () const
 
void setDebugName (const std::string &debugName)
 
 SonicClientBase (const edm::ParameterSet &params)
 
virtual ~SonicClientBase ()=default
 
- Public Member Functions inherited from SonicClientTypes< TritonInputMap, TritonOutputMap >
Inputinput ()
 
const Outputoutput () 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
 
bool getResults (std::shared_ptr< nvidia::inferenceserver::client::InferResult > results)
 
inference::ModelStatistics getServerSideStatus () 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 start ()
 
void start (edm::WaitingTaskWithArenaHolder holder)
 

Protected Attributes

unsigned batchSize_
 
std::unique_ptr< nvidia::inferenceserver::client::InferenceServerGrpcClient > client_
 
std::vector< nvidia::inferenceserver::client::InferInput * > inputsTriton_
 
unsigned maxBatchSize_
 
bool noBatch_
 
nvidia::inferenceserver::client::InferOptions options_
 
std::vector< const nvidia::inferenceserver::client::InferRequestedOutput * > outputsTriton_
 
bool verbose_
 
- Protected Attributes inherited from SonicClientBase
unsigned allowedTries_
 
std::string clientName_
 
std::string debugName_
 
std::unique_ptr< SonicDispatcherdispatcher_
 
std::string fullDebugName_
 
std::optional< edm::WaitingTaskWithArenaHolderholder_
 
SonicMode mode_
 
std::chrono::time_point< std::chrono::high_resolution_clock > t0_
 
unsigned tries_
 
- Protected Attributes inherited from SonicClientTypes< TritonInputMap, TritonOutputMap >
Input input_
 
Output output_
 

Additional Inherited Members

- Public Types inherited from SonicClientTypes< TritonInputMap, TritonOutputMap >
typedef TritonInputMap Input
 
typedef TritonOutputMap Output
 

Detailed Description

Definition at line 18 of file TritonClient.h.

Constructor & Destructor Documentation

◆ TritonClient()

TritonClient::TritonClient ( const edm::ParameterSet params)

Definition at line 23 of file TritonClient.cc.

25  verbose_(params.getUntrackedParameter<bool>("verbose")),
26  options_(params.getParameter<std::string>("modelName")) {
27  clientName_ = "TritonClient";
28  //will get overwritten later, just used in constructor
30 
31  //connect to the server
32  //TODO: add SSL options
33  std::string url(params.getUntrackedParameter<std::string>("address") + ":" +
34  std::to_string(params.getUntrackedParameter<unsigned>("port")));
35  triton_utils::throwIfError(nic::InferenceServerGrpcClient::Create(&client_, url, false),
36  "TritonClient(): unable to create inference context");
37 
38  //set options
39  options_.model_version_ = params.getParameter<std::string>("modelVersion");
40  //convert seconds to microseconds
41  options_.client_timeout_ = params.getUntrackedParameter<unsigned>("timeout") * 1e6;
42 
43  //config needed for batch size
44  inference::ModelConfigResponse modelConfigResponse;
45  triton_utils::throwIfError(client_->ModelConfig(&modelConfigResponse, options_.model_name_, options_.model_version_),
46  "TritonClient(): unable to get model config");
47  inference::ModelConfig modelConfig(modelConfigResponse.config());
48 
49  //check batch size limitations (after i/o setup)
50  //triton uses max batch size = 0 to denote a model that does not support batching
51  //but for models that do support batching, a given event may set batch size 0 to indicate no valid input is present
52  //so set the local max to 1 and keep track of "no batch" case
53  maxBatchSize_ = modelConfig.max_batch_size();
54  noBatch_ = maxBatchSize_ == 0;
56 
57  //get model info
58  inference::ModelMetadataResponse modelMetadata;
59  triton_utils::throwIfError(client_->ModelMetadata(&modelMetadata, options_.model_name_, options_.model_version_),
60  "TritonClient(): unable to get model metadata");
61 
62  //get input and output (which know their sizes)
63  const auto& nicInputs = modelMetadata.inputs();
64  const auto& nicOutputs = modelMetadata.outputs();
65 
66  //report all model errors at once
67  std::stringstream msg;
68  std::string msg_str;
69 
70  //currently no use case is foreseen for a model with zero inputs or outputs
71  if (nicInputs.empty())
72  msg << "Model on server appears malformed (zero inputs)\n";
73 
74  if (nicOutputs.empty())
75  msg << "Model on server appears malformed (zero outputs)\n";
76 
77  //stop if errors
78  msg_str = msg.str();
79  if (!msg_str.empty())
80  throw cms::Exception("ModelErrors") << msg_str;
81 
82  //setup input map
83  std::stringstream io_msg;
84  if (verbose_)
85  io_msg << "Model inputs: "
86  << "\n";
87  inputsTriton_.reserve(nicInputs.size());
88  for (const auto& nicInput : nicInputs) {
89  const auto& iname = nicInput.name();
90  auto [curr_itr, success] = input_.emplace(
91  std::piecewise_construct, std::forward_as_tuple(iname), std::forward_as_tuple(iname, nicInput, noBatch_));
92  auto& curr_input = curr_itr->second;
93  inputsTriton_.push_back(curr_input.data());
94  if (verbose_) {
95  io_msg << " " << iname << " (" << curr_input.dname() << ", " << curr_input.byteSize()
96  << " b) : " << triton_utils::printColl(curr_input.shape()) << "\n";
97  }
98  }
99 
100  //allow selecting only some outputs from server
101  const auto& v_outputs = params.getUntrackedParameter<std::vector<std::string>>("outputs");
102  std::unordered_set s_outputs(v_outputs.begin(), v_outputs.end());
103 
104  //setup output map
105  if (verbose_)
106  io_msg << "Model outputs: "
107  << "\n";
108  outputsTriton_.reserve(nicOutputs.size());
109  for (const auto& nicOutput : nicOutputs) {
110  const auto& oname = nicOutput.name();
111  if (!s_outputs.empty() and s_outputs.find(oname) == s_outputs.end())
112  continue;
113  auto [curr_itr, success] = output_.emplace(
114  std::piecewise_construct, std::forward_as_tuple(oname), std::forward_as_tuple(oname, nicOutput, noBatch_));
115  auto& curr_output = curr_itr->second;
116  outputsTriton_.push_back(curr_output.data());
117  if (verbose_) {
118  io_msg << " " << oname << " (" << curr_output.dname() << ", " << curr_output.byteSize()
119  << " b) : " << triton_utils::printColl(curr_output.shape()) << "\n";
120  }
121  if (!s_outputs.empty())
122  s_outputs.erase(oname);
123  }
124 
125  //check if any requested outputs were not available
126  if (!s_outputs.empty())
127  throw cms::Exception("MissingOutput")
128  << "Some requested outputs were not available on the server: " << triton_utils::printColl(s_outputs);
129 
130  //check requested batch size and propagate to inputs and outputs
131  setBatchSize(params.getUntrackedParameter<unsigned>("batchSize"));
132 
133  //print model info
134  std::stringstream model_msg;
135  if (verbose_) {
136  model_msg << "Model name: " << options_.model_name_ << "\n"
137  << "Model version: " << options_.model_version_ << "\n"
138  << "Model max batch size: " << (noBatch_ ? 0 : maxBatchSize_) << "\n";
139  edm::LogInfo(fullDebugName_) << model_msg.str() << io_msg.str();
140  }
141 }

References client_, SonicClientBase::clientName_, SonicClientBase::fullDebugName_, SonicClientTypes< TritonInputMap, TritonOutputMap >::input_, inputsTriton_, SiStripPI::max, maxBatchSize_, mps_check::msg, noBatch_, heppy_report::oname, options_, SonicClientTypes< TritonInputMap, TritonOutputMap >::output_, outputsTriton_, CalibrationSummaryClient_cfi::params, triton_utils::printColl(), setBatchSize(), AlCaHLTBitMon_QueryRunRegistry::string, summarizeEdmComparisonLogfiles::success, triton_utils::throwIfError(), relmon_authenticated_wget::url, and verbose_.

Member Function Documentation

◆ batchSize()

unsigned TritonClient::batchSize ( ) const
inline

Definition at line 35 of file TritonClient.h.

35 { return batchSize_; }

References batchSize_.

◆ evaluate()

void TritonClient::evaluate ( )
overrideprotectedvirtual

Implements SonicClientBase.

Definition at line 189 of file TritonClient.cc.

189  {
190  //in case there is nothing to process
191  if (batchSize_ == 0) {
192  finish(true);
193  return;
194  }
195 
196  // Get the status of the server prior to the request being made.
197  const auto& start_status = getServerSideStatus();
198 
199  if (mode_ == SonicMode::Async) {
200  //non-blocking call
203  client_->AsyncInfer(
204  [t1, start_status, this](nic::InferResult* results) {
205  //get results
206  std::shared_ptr<nic::InferResult> results_ptr(results);
207  bool status = triton_utils::warnIfError(results_ptr->RequestStatus(), "evaluate(): unable to get result");
208  if (!status) {
209  finish(false);
210  return;
211  }
213 
214  if (!debugName_.empty())
216  << "Remote time: " << std::chrono::duration_cast<std::chrono::microseconds>(t2 - t1).count();
217 
218  const auto& end_status = getServerSideStatus();
219 
220  if (verbose()) {
221  const auto& stats = summarizeServerStats(start_status, end_status);
223  }
224 
225  //check result
226  status = getResults(results_ptr);
227 
228  //finish
229  finish(status);
230  },
231  options_,
234  "evaluate(): unable to launch async run");
235 
236  //if AsyncRun failed, finish() wasn't called
237  if (!status)
238  finish(false);
239  } else {
240  //blocking call
242  nic::InferResult* results;
244  "evaluate(): unable to run and/or get result");
245  if (!status) {
246  finish(false);
247  return;
248  }
249 
251  if (!debugName_.empty())
252  edm::LogInfo(fullDebugName_) << "Remote time: "
253  << std::chrono::duration_cast<std::chrono::microseconds>(t2 - t1).count();
254 
255  const auto& end_status = getServerSideStatus();
256 
257  if (verbose()) {
258  const auto& stats = summarizeServerStats(start_status, end_status);
260  }
261 
262  std::shared_ptr<nic::InferResult> results_ptr(results);
263  status = getResults(results_ptr);
264 
265  finish(status);
266  }
267 }

References Async, batchSize_, client_, SonicClientBase::debugName_, SonicClientBase::finish(), SonicClientBase::fullDebugName_, getResults(), getServerSideStatus(), inputsTriton_, SonicClientBase::mode_, submitPVValidationJobs::now, options_, outputsTriton_, reportServerSideStats(), bookConverter::results, dqmMemoryStats::stats, mps_update::status, summarizeServerStats(), RandomServiceHelper::t1, RandomServiceHelper::t2, verbose(), and triton_utils::warnIfError().

◆ fillPSetDescription()

void TritonClient::fillPSetDescription ( edm::ParameterSetDescription iDesc)
static

Definition at line 338 of file TritonClient.cc.

338  {
339  edm::ParameterSetDescription descClient;
340  fillBasePSetDescription(descClient);
341  descClient.add<std::string>("modelName");
342  descClient.add<std::string>("modelVersion", "");
343  //server parameters should not affect the physics results
344  descClient.addUntracked<unsigned>("batchSize");
345  descClient.addUntracked<std::string>("address");
346  descClient.addUntracked<unsigned>("port");
347  descClient.addUntracked<unsigned>("timeout");
348  descClient.addUntracked<bool>("verbose", false);
349  descClient.addUntracked<std::vector<std::string>>("outputs", {});
350  iDesc.add<edm::ParameterSetDescription>("Client", descClient);
351 }

References edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addUntracked(), SonicClientBase::fillBasePSetDescription(), and AlCaHLTBitMon_QueryRunRegistry::string.

◆ getResults()

bool TritonClient::getResults ( std::shared_ptr< nvidia::inferenceserver::client::InferResult >  results)
protected

Definition at line 170 of file TritonClient.cc.

170  {
171  for (auto& [oname, output] : output_) {
172  //set shape here before output becomes const
173  if (output.variableDims()) {
174  std::vector<int64_t> tmp_shape;
175  bool status = triton_utils::warnIfError(results->Shape(oname, &tmp_shape),
176  "getResults(): unable to get output shape for " + oname);
177  if (!status)
178  return status;
179  output.setShape(tmp_shape, false);
180  }
181  //extend lifetime
182  output.setResult(results);
183  }
184 
185  return true;
186 }

References heppy_report::oname, SonicClientTypes< TritonInputMap, TritonOutputMap >::output(), SonicClientTypes< TritonInputMap, TritonOutputMap >::output_, bookConverter::results, mps_update::status, and triton_utils::warnIfError().

Referenced by evaluate().

◆ getServerSideStatus()

inference::ModelStatistics TritonClient::getServerSideStatus ( ) const
protected

Definition at line 327 of file TritonClient.cc.

327  {
328  if (verbose_) {
329  inference::ModelStatisticsResponse resp;
330  triton_utils::warnIfError(client_->ModelInferenceStatistics(&resp, options_.model_name_, options_.model_version_),
331  "getServerSideStatus(): unable to get model statistics");
332  return *(resp.model_stats().begin());
333  }
334  return inference::ModelStatistics{};
335 }

References client_, options_, verbose_, and triton_utils::warnIfError().

Referenced by evaluate().

◆ reportServerSideStats()

void TritonClient::reportServerSideStats ( const ServerSideStats stats) const
protected

Definition at line 269 of file TritonClient.cc.

269  {
270  std::stringstream msg;
271 
272  // https://github.com/triton-inference-server/server/blob/v2.3.0/src/clients/c++/perf_client/inference_profiler.cc
273  const uint64_t count = stats.success_count_;
274  msg << " Inference count: " << stats.inference_count_ << "\n";
275  msg << " Execution count: " << stats.execution_count_ << "\n";
276  msg << " Successful request count: " << count << "\n";
277 
278  if (count > 0) {
279  auto get_avg_us = [count](uint64_t tval) {
280  constexpr uint64_t us_to_ns = 1000;
281  return tval / us_to_ns / count;
282  };
283 
284  const uint64_t cumm_avg_us = get_avg_us(stats.cumm_time_ns_);
285  const uint64_t queue_avg_us = get_avg_us(stats.queue_time_ns_);
286  const uint64_t compute_input_avg_us = get_avg_us(stats.compute_input_time_ns_);
287  const uint64_t compute_infer_avg_us = get_avg_us(stats.compute_infer_time_ns_);
288  const uint64_t compute_output_avg_us = get_avg_us(stats.compute_output_time_ns_);
289  const uint64_t compute_avg_us = compute_input_avg_us + compute_infer_avg_us + compute_output_avg_us;
290  const uint64_t overhead =
291  (cumm_avg_us > queue_avg_us + compute_avg_us) ? (cumm_avg_us - queue_avg_us - compute_avg_us) : 0;
292 
293  msg << " Avg request latency: " << cumm_avg_us << " usec"
294  << "\n"
295  << " (overhead " << overhead << " usec + "
296  << "queue " << queue_avg_us << " usec + "
297  << "compute input " << compute_input_avg_us << " usec + "
298  << "compute infer " << compute_infer_avg_us << " usec + "
299  << "compute output " << compute_output_avg_us << " usec)" << std::endl;
300  }
301 
302  if (!debugName_.empty())
303  edm::LogInfo(fullDebugName_) << msg.str();
304 }

References submitPVResolutionJobs::count, SonicClientBase::debugName_, SonicClientBase::fullDebugName_, mps_check::msg, and dqmMemoryStats::stats.

Referenced by evaluate().

◆ reset()

void TritonClient::reset ( void  )
overridevirtual

Reimplemented from SonicClientBase.

Definition at line 161 of file TritonClient.cc.

161  {
162  for (auto& element : input_) {
163  element.second.reset();
164  }
165  for (auto& element : output_) {
166  element.second.reset();
167  }
168 }

References SonicClientTypes< TritonInputMap, TritonOutputMap >::input_, and SonicClientTypes< TritonInputMap, TritonOutputMap >::output_.

◆ setBatchSize()

bool TritonClient::setBatchSize ( unsigned  bsize)

Definition at line 143 of file TritonClient.cc.

143  {
144  if (bsize > maxBatchSize_) {
145  edm::LogWarning(fullDebugName_) << "Requested batch size " << bsize << " exceeds server-specified max batch size "
146  << maxBatchSize_ << ". Batch size will remain as" << batchSize_;
147  return false;
148  } else {
149  batchSize_ = bsize;
150  //set for input and output
151  for (auto& element : input_) {
152  element.second.setBatchSize(bsize);
153  }
154  for (auto& element : output_) {
155  element.second.setBatchSize(bsize);
156  }
157  return true;
158  }
159 }

References batchSize_, SonicClientBase::fullDebugName_, SonicClientTypes< TritonInputMap, TritonOutputMap >::input_, maxBatchSize_, and SonicClientTypes< TritonInputMap, TritonOutputMap >::output_.

Referenced by TritonClient().

◆ summarizeServerStats()

TritonClient::ServerSideStats TritonClient::summarizeServerStats ( const inference::ModelStatistics &  start_status,
const inference::ModelStatistics &  end_status 
) const
protected

Definition at line 306 of file TritonClient.cc.

307  {
308  TritonClient::ServerSideStats server_stats;
309 
310  server_stats.inference_count_ = end_status.inference_count() - start_status.inference_count();
311  server_stats.execution_count_ = end_status.execution_count() - start_status.execution_count();
312  server_stats.success_count_ =
313  end_status.inference_stats().success().count() - start_status.inference_stats().success().count();
314  server_stats.cumm_time_ns_ =
315  end_status.inference_stats().success().ns() - start_status.inference_stats().success().ns();
316  server_stats.queue_time_ns_ = end_status.inference_stats().queue().ns() - start_status.inference_stats().queue().ns();
317  server_stats.compute_input_time_ns_ =
318  end_status.inference_stats().compute_input().ns() - start_status.inference_stats().compute_input().ns();
319  server_stats.compute_infer_time_ns_ =
320  end_status.inference_stats().compute_infer().ns() - start_status.inference_stats().compute_infer().ns();
321  server_stats.compute_output_time_ns_ =
322  end_status.inference_stats().compute_output().ns() - start_status.inference_stats().compute_output().ns();
323 
324  return server_stats;
325 }

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().

◆ verbose()

bool TritonClient::verbose ( ) const
inline

Definition at line 36 of file TritonClient.h.

36 { return verbose_; }

References verbose_.

Referenced by evaluate().

Member Data Documentation

◆ batchSize_

unsigned TritonClient::batchSize_
protected

Definition at line 57 of file TritonClient.h.

Referenced by batchSize(), evaluate(), and setBatchSize().

◆ client_

std::unique_ptr<nvidia::inferenceserver::client::InferenceServerGrpcClient> TritonClient::client_
protected

Definition at line 65 of file TritonClient.h.

Referenced by evaluate(), getServerSideStatus(), and TritonClient().

◆ inputsTriton_

std::vector<nvidia::inferenceserver::client::InferInput*> TritonClient::inputsTriton_
protected

Definition at line 62 of file TritonClient.h.

Referenced by evaluate(), and TritonClient().

◆ maxBatchSize_

unsigned TritonClient::maxBatchSize_
protected

Definition at line 56 of file TritonClient.h.

Referenced by setBatchSize(), and TritonClient().

◆ noBatch_

bool TritonClient::noBatch_
protected

Definition at line 58 of file TritonClient.h.

Referenced by TritonClient().

◆ options_

nvidia::inferenceserver::client::InferOptions TritonClient::options_
protected

◆ outputsTriton_

std::vector<const nvidia::inferenceserver::client::InferRequestedOutput*> TritonClient::outputsTriton_
protected

Definition at line 63 of file TritonClient.h.

Referenced by evaluate(), and TritonClient().

◆ verbose_

bool TritonClient::verbose_
protected

Definition at line 59 of file TritonClient.h.

Referenced by getServerSideStatus(), TritonClient(), and verbose().

TritonClient::maxBatchSize_
unsigned maxBatchSize_
Definition: TritonClient.h:56
RandomServiceHelper.t2
t2
Definition: RandomServiceHelper.py:257
TritonClient::ServerSideStats::inference_count_
uint64_t inference_count_
Definition: TritonClient.h:21
SonicClientTypes< TritonInputMap, TritonOutputMap >::input_
Input input_
Definition: SonicClientTypes.h:19
TritonClient::noBatch_
bool noBatch_
Definition: TritonClient.h:58
relmon_authenticated_wget.url
url
Definition: relmon_authenticated_wget.py:22
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
SonicClientBase::fillBasePSetDescription
static void fillBasePSetDescription(edm::ParameterSetDescription &desc, bool allowRetry=true)
Definition: SonicClientBase.cc:71
TritonClient::client_
std::unique_ptr< nvidia::inferenceserver::client::InferenceServerGrpcClient > client_
Definition: TritonClient.h:65
TritonClient::outputsTriton_
std::vector< const nvidia::inferenceserver::client::InferRequestedOutput * > outputsTriton_
Definition: TritonClient.h:63
submitPVValidationJobs.now
now
Definition: submitPVValidationJobs.py:639
mps_update.status
status
Definition: mps_update.py:69
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
SonicClientTypes< TritonInputMap, TritonOutputMap >::output_
Output output_
Definition: SonicClientTypes.h:20
SonicClientTypes< TritonInputMap, TritonOutputMap >::output
const Output & output() const
Definition: SonicClientTypes.h:16
TritonClient::ServerSideStats
Definition: TritonClient.h:20
TritonClient::summarizeServerStats
ServerSideStats summarizeServerStats(const inference::ModelStatistics &start_status, const inference::ModelStatistics &end_status) const
Definition: TritonClient.cc:306
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
TritonClient::setBatchSize
bool setBatchSize(unsigned bsize)
Definition: TritonClient.cc:143
SonicClientBase::finish
void finish(bool success, std::exception_ptr eptr=std::exception_ptr{})
Definition: SonicClientBase.cc:42
bookConverter.results
results
Definition: bookConverter.py:144
mps_check.msg
tuple msg
Definition: mps_check.py:285
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
triton_utils::warnIfError
bool warnIfError(const Error &err, std::string_view msg)
Definition: triton_utils.cc:25
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
triton_utils::throwIfError
void throwIfError(const Error &err, std::string_view msg)
Definition: triton_utils.cc:20
RandomServiceHelper.t1
t1
Definition: RandomServiceHelper.py:256
TritonClient::ServerSideStats::compute_infer_time_ns_
uint64_t compute_infer_time_ns_
Definition: TritonClient.h:27
TritonClient::ServerSideStats::compute_input_time_ns_
uint64_t compute_input_time_ns_
Definition: TritonClient.h:26
summarizeEdmComparisonLogfiles.success
success
Definition: summarizeEdmComparisonLogfiles.py:115
submitPVResolutionJobs.count
count
Definition: submitPVResolutionJobs.py:352
TritonClient::inputsTriton_
std::vector< nvidia::inferenceserver::client::InferInput * > inputsTriton_
Definition: TritonClient.h:62
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSetDescription::addUntracked
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:100
TritonClient::verbose_
bool verbose_
Definition: TritonClient.h:59
SonicClientBase::mode_
SonicMode mode_
Definition: SonicClientBase.h:54
SonicMode::Async
TritonClient::reportServerSideStats
void reportServerSideStats(const ServerSideStats &stats) const
Definition: TritonClient.cc:269
SonicClientBase::fullDebugName_
std::string fullDebugName_
Definition: SonicClientBase.h:60
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
TritonClient::ServerSideStats::execution_count_
uint64_t execution_count_
Definition: TritonClient.h:22
TritonClient::ServerSideStats::success_count_
uint64_t success_count_
Definition: TritonClient.h:23
TritonClient::getResults
bool getResults(std::shared_ptr< nvidia::inferenceserver::client::InferResult > results)
Definition: TritonClient.cc:170
SonicClientBase::debugName_
std::string debugName_
Definition: SonicClientBase.h:60
dqmMemoryStats.stats
stats
Definition: dqmMemoryStats.py:134
TritonClient::ServerSideStats::compute_output_time_ns_
uint64_t compute_output_time_ns_
Definition: TritonClient.h:28
TritonClient::batchSize_
unsigned batchSize_
Definition: TritonClient.h:57
TritonClient::ServerSideStats::queue_time_ns_
uint64_t queue_time_ns_
Definition: TritonClient.h:25
SonicClient< TritonInputMap, TritonOutputMap >::SonicClient
SonicClient(const edm::ParameterSet &params)
Definition: SonicClient.h:12
TritonClient::verbose
bool verbose() const
Definition: TritonClient.h:36
TritonClient::options_
nvidia::inferenceserver::client::InferOptions options_
Definition: TritonClient.h:67
cond::uint64_t
unsigned long long uint64_t
Definition: Time.h:13
cms::Exception
Definition: Exception.h:70
TritonClient::getServerSideStatus
inference::ModelStatistics getServerSideStatus() const
Definition: TritonClient.cc:327
SonicClientBase::clientName_
std::string clientName_
Definition: SonicClientBase.h:60
TritonClient::ServerSideStats::cumm_time_ns_
uint64_t cumm_time_ns_
Definition: TritonClient.h:24
edm::Log
Definition: MessageLogger.h:70
heppy_report.oname
oname
Definition: heppy_report.py:58
triton_utils::printColl
std::string printColl(const C &coll, const std::string &delim=", ")
Definition: triton_utils.cc:11