#include <TritonData.h>
Public Types | |
using | Result = nvidia::inferenceserver::client::InferResult |
using | ShapeType = std::vector< int64_t > |
using | ShapeView = edm::Span< ShapeType::const_iterator > |
using | TensorMetadata = inference::ModelMetadataResponse_TensorMetadata |
Public Member Functions | |
unsigned | batchSize () const |
int64_t | byteSize () const |
const std::string & | dname () const |
template<typename DT > | |
TritonOutput< DT > | fromServer () const |
bool | setShape (const ShapeType &newShape) |
bool | setShape (unsigned loc, int64_t val) |
const ShapeView & | shape () const |
int64_t | sizeDims () const |
int64_t | sizeShape () const |
template<typename DT > | |
void | toServer (std::shared_ptr< TritonInput< DT >> ptr) |
TritonData (const std::string &name, const TensorMetadata &model_info, bool noBatch) | |
bool | variableDims () const |
Private Member Functions | |
bool | anyNeg (const ShapeView &vec) const |
void | createObject (IO **ioptr) const |
IO * | data () |
int64_t | dimProduct (const ShapeView &vec) const |
void | reset () |
void | setBatchSize (unsigned bsize) |
void | setResult (std::shared_ptr< Result > result) |
bool | setShape (const ShapeType &newShape, bool canThrow) |
bool | setShape (unsigned loc, int64_t val, bool canThrow) |
Private Attributes | |
unsigned | batchSize_ |
int64_t | byteSize_ |
std::shared_ptr< IO > | data_ |
const ShapeType | dims_ |
std::string | dname_ |
inference::DataType | dtype_ |
ShapeType | fullShape_ |
std::any | holder_ |
std::string | name_ |
bool | noBatch_ |
int64_t | productDims_ |
std::shared_ptr< Result > | result_ |
ShapeView | shape_ |
bool | variableDims_ |
Friends | |
class | TritonClient |
Definition at line 29 of file TritonData.h.
using TritonData< IO >::Result = nvidia::inferenceserver::client::InferResult |
Definition at line 31 of file TritonData.h.
using TritonData< IO >::ShapeType = std::vector<int64_t> |
Definition at line 33 of file TritonData.h.
using TritonData< IO >::ShapeView = edm::Span<ShapeType::const_iterator> |
Definition at line 34 of file TritonData.h.
using TritonData< IO >::TensorMetadata = inference::ModelMetadataResponse_TensorMetadata |
Definition at line 32 of file TritonData.h.
TritonData< IO >::TritonData | ( | const std::string & | name, |
const TensorMetadata & | model_info, | ||
bool | noBatch | ||
) |
Definition at line 25 of file TritonData.cc.
References TritonData< IO >::createObject(), and TritonData< IO >::data_.
|
inlineprivate |
Definition at line 73 of file TritonData.h.
References edm::Span< T >::begin(), edm::Span< T >::end(), and mps_fire::i.
|
inline |
|
inline |
|
private |
Referenced by TritonData< IO >::TritonData().
|
inlineprivate |
|
inlineprivate |
Definition at line 76 of file TritonData.h.
References edm::Span< T >::begin(), and edm::Span< T >::end().
Referenced by TritonData< IO >::sizeShape().
|
inline |
TritonOutput< DT > TritonOutputData::fromServer | ( | ) | const |
Definition at line 136 of file TritonData.cc.
References TritonData< IO >::batchSize_, TritonData< IO >::byteSize_, TritonData< IO >::dname_, GeomDetEnumerators::DT, Exception, TritonData< IO >::name_, hltrates_dqm_sourceclient-live_cfg::offset, diffTwoXMLs::r1, TritonData< IO >::result_, TritonData< IO >::sizeShape(), and triton_utils::throwIfError().
|
private |
Definition at line 168 of file TritonData.cc.
References TritonData< IO >::data_, and TritonData< IO >::holder_.
|
private |
Definition at line 98 of file TritonData.cc.
|
inlineprivate |
Definition at line 69 of file TritonData.h.
References mps_fire::result, and TritonData< IO >::result_.
|
inline |
Definition at line 40 of file TritonData.h.
References TritonData< IO >::setShape().
Referenced by TritonData< IO >::setShape().
|
private |
|
inline |
Definition at line 41 of file TritonData.h.
References TritonData< IO >::setShape(), and heppy_batch::val.
Referenced by TritonData< IO >::setShape().
|
private |
Definition at line 64 of file TritonData.cc.
References Exception, mps_check::msg, and heppy_batch::val.
|
inline |
|
inline |
Definition at line 57 of file TritonData.h.
References TritonData< IO >::productDims_.
Referenced by TritonData< IO >::sizeShape().
|
inline |
Definition at line 59 of file TritonData.h.
References TritonData< IO >::dimProduct(), TritonData< IO >::shape_, TritonData< IO >::sizeDims(), and TritonData< IO >::variableDims_.
Referenced by TritonData< IO >::fromServer(), and TritonData< IO >::toServer().
void TritonInputData::toServer | ( | std::shared_ptr< TritonInput< DT >> | ptr | ) |
Definition at line 107 of file TritonData.cc.
References TritonData< IO >::batchSize_, TritonData< IO >::byteSize_, TritonData< IO >::data_, TritonData< IO >::dname_, GeomDetEnumerators::DT, Exception, TritonData< IO >::fullShape_, TritonData< IO >::holder_, eostools::move(), TritonData< IO >::name_, TritonData< IO >::sizeShape(), and triton_utils::throwIfError().
|
inline |
|
friend |
Definition at line 62 of file TritonData.h.
|
private |
Definition at line 86 of file TritonData.h.
Referenced by TritonData< IO >::batchSize(), TritonData< IO >::fromServer(), and TritonData< IO >::toServer().
|
private |
Definition at line 93 of file TritonData.h.
Referenced by TritonData< IO >::byteSize(), TritonData< IO >::fromServer(), and TritonData< IO >::toServer().
|
private |
Definition at line 83 of file TritonData.h.
Referenced by TritonData< IO >::data(), TritonData< IO >::reset(), TritonData< IO >::toServer(), and TritonData< IO >::TritonData().
|
private |
Definition at line 84 of file TritonData.h.
|
private |
Definition at line 91 of file TritonData.h.
Referenced by TritonData< IO >::dname(), TritonData< IO >::fromServer(), and TritonData< IO >::toServer().
|
private |
Definition at line 92 of file TritonData.h.
|
private |
Definition at line 87 of file TritonData.h.
Referenced by TritonData< IO >::toServer().
|
private |
Definition at line 94 of file TritonData.h.
Referenced by TritonData< IO >::reset(), and TritonData< IO >::toServer().
|
private |
Definition at line 82 of file TritonData.h.
Referenced by TritonData< IO >::fromServer(), and TritonData< IO >::toServer().
|
private |
Definition at line 85 of file TritonData.h.
|
private |
Definition at line 90 of file TritonData.h.
Referenced by TritonData< IO >::sizeDims().
|
private |
Definition at line 95 of file TritonData.h.
Referenced by TritonData< IO >::fromServer(), and TritonData< IO >::setResult().
|
private |
Definition at line 88 of file TritonData.h.
Referenced by TritonData< IO >::shape(), and TritonData< IO >::sizeShape().
|
private |
Definition at line 89 of file TritonData.h.
Referenced by TritonData< IO >::sizeShape(), and TritonData< IO >::variableDims().