NVIDIA DeepStream SDK API Reference

9.1 Release
9.1/sources/libs/nvdsinferserver/infer_trtis_server.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2020-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
29 #ifndef __NVDSINFER_TRTIS_SERVER_H__
30 #define __NVDSINFER_TRTIS_SERVER_H__
31 
32 #include <string>
33 #include <thread>
34 #include <vector>
35 #include <memory>
36 
37 #include "infer_batch_buffer.h"
38 #include "infer_post_datatypes.h"
39 #include "infer_proto_utils.h"
40 #include "infer_trtis_utils.h"
41 
42 #include "nvds_version.h"
43 
44 #ifdef IS_TEGRA
45 #define TRITON_DEFAULT_MINIMUM_COMPUTE_CAPABILITY 5.3
46 #define TRITON_DEFAULT_PINNED_MEMORY_BYTES (1 << 26)
47 #else
48 #define TRITON_DEFAULT_MINIMUM_COMPUTE_CAPABILITY 6.0
49 #define TRITON_DEFAULT_PINNED_MEMORY_BYTES (1 << 28)
50 #endif
51 #define TRITON_DEFAULT_BACKEND_DIR "/opt/tritonserver/backends"
52 
53 struct TRITONSERVER_Server;
54 
55 namespace nvdsinferserver {
56 
57 namespace ni = inference;
58 
59 class TrtISServer;
60 class TrtServerRequest;
61 class TrtServerResponse;
62 class TrtServerAllocator;
63 
64 using SharedRequest = std::shared_ptr<TrtServerRequest>;
65 using UniqResponse = std::unique_ptr<TrtServerResponse>;
66 using SharedResponse = std::shared_ptr<TrtServerResponse>;
67 
68 using TritonInferAsyncDone = std::function<void(SharedRequest, UniqResponse)>;
69 
73 class TrtServerRequest {
74 protected:
75  friend class TrtISServer;
82 
95  const std::string& model, int64_t version, SharedBatchArray& inputs,
96  const std::vector<std::string>& outputs, uint64_t reqId,
97  const std::vector<TritonClassParams>& clasList);
98 
107  void* userPtr);
108 
117  ShrTritonAllocator& allocator,
119  void* responseUserPtr);
120 
127  static void RequestOnRelease(
128  TRITONSERVER_InferenceRequest* request, const uint32_t flags,
129  void* userp);
130 
131 public:
136 
140  TRITONSERVER_InferenceRequest* ptr() { return m_ReqPtr.get(); }
144  const std::string& model() const { return m_Model; }
148  uint64_t id() const { return m_ReqId; }
152  uint64_t bufId() const { return m_BufId; }
157  SharedBatchArray releaseInputs() { return std::move(m_Inputs); }
161  const std::vector<std::string>& outputs() const { return m_Outputs; }
166  const std::map<std::string, TritonClassParams>& classParams() const {
167  return m_ClasList; }
168 
169 private:
176  NvDsInferStatus setInputs(SharedBatchArray& inputs);
181  NvDsInferStatus setOption(const IOptions* option);
182 
184 
185 private:
193  std::weak_ptr<TrtISServer> m_Server;
197  SharedBatchArray m_Inputs;
201  std::string m_Model;
205  uint64_t m_ReqId = UINT64_C(0);
209  uint64_t m_BufId = UINT64_C(0);
210 
214  std::vector<std::string> m_Outputs;
218  std::map<std::string, TritonClassParams> m_ClasList;
219 };
220 
224 class TrtServerResponse {
225  friend class TrtISServer;
226 
227 protected:
235  TrtServerPtr server, UniqTritonT<TRITONSERVER_InferenceResponse> data,
236  uint64_t id);
237 
238 public:
249  NvDsInferStatus parse(const TrtServerRequest* req);
253  const std::string& model() const { return m_Model; }
257  std::vector<SharedBatchBuf>& mutableOutputs() { return m_BufOutputs; }
261  NvDsInferStatus getStatus() const { return m_Status; }
265  SharedOptions takeoverOptions() { return std::move(m_Options); }
266 
267 private:
271  NvDsInferStatus parseParams();
272 
285  NvDsInferStatus parseOutputData(const TrtServerRequest* req);
286 
297  NvDsInferStatus addClass(
298  const TritonClassParams& classP, const InferBufferDescription& desc, uint32_t batchSize,
299  uint32_t tensorIdx, const void* base);
300 
311  NvDsInferStatus topKClass(
312  InferClassificationOutput& ret, const TritonClassParams& classP,
313  const InferBufferDescription& desc, uint32_t tensorIdx, const void* base);
314 
316 
320  uint64_t m_ResponseId = UINT64_C(0);
328  std::weak_ptr<TrtISServer> m_Server;
332  std::string m_Model;
336  int64_t m_ModelVersion = UINT64_C(1);
341 
346  std::vector<SharedBatchBuf> m_BufOutputs;
350  SharedOptions m_Options;
351 };
352 
356 class TrtServerAllocator
357  : public std::enable_shared_from_this<TrtServerAllocator> {
358 public:
359  using AllocFn = std::function<SharedSysMem(const std::string&, size_t, InferMemType, int64_t)>;
360  using FreeFn = std::function<void(const std::string&, SharedSysMem)>;
361 
369  TrtServerAllocator(AllocFn alloc, FreeFn release);
370 
374  virtual ~TrtServerAllocator() = default;
375 
379  TRITONSERVER_ResponseAllocator* ptr() { return m_Allocator.get(); }
380 
381 private:
397  static TRITONSERVER_Error* ResponseAlloc(
398  TRITONSERVER_ResponseAllocator* allocator, const char* tensorName,
399  size_t bytes, TRITONSERVER_MemoryType preferredMemType,
400  int64_t preferredDevId, void* userP, void** buffer, void** bufferUserP,
401  TRITONSERVER_MemoryType* actualMemType, int64_t* actualMemTypeId);
402 
413  static TRITONSERVER_Error* ResponseRelease(
414  TRITONSERVER_ResponseAllocator* allocator, void* buffer,
415  void* bufferUserP, size_t bytes, TRITONSERVER_MemoryType memType,
416  int64_t devId);
417 
418 private:
419  DISABLE_CLASS_COPY(TrtServerAllocator);
420 
428  AllocFn m_allocFn;
432  FreeFn m_releaseFn;
433 };
434 
435 namespace triton {
436 
440 struct BackendConfig {
444  std::string backend;
448  std::string key;
452  std::string value;
453 };
454 
458 struct RepoSettings {
462  std::set<std::string> roots;
466  uint32_t logLevel = 0;
470  bool tfAllowSoftPlacement = true;
474  float tfGpuMemoryFraction = 0;
478  bool strictModelConfig = true;
499  std::map<uint32_t, uint64_t> cudaDevMemMap;
503  std::vector<BackendConfig> backendConfigs;
504 
508  std::string debugStr;
509 
517  bool initFrom(
518  const ic::TritonModelRepo& repo, const std::vector<int>& devIds);
519 
526  bool operator==(const RepoSettings& other) const;
527  bool operator!=(const RepoSettings& other) const
528  {
529  return !this->operator==(other);
530  }
532 };
533 } // namespace triton
534 
538 class TrtISServer : public std::enable_shared_from_this<TrtISServer> {
539  friend class TrtServerRequest;
540  friend class TrtServerResponse;
541 
542 protected:
547  TrtISServer(const triton::RepoSettings& repo);
548 
559 
563  const triton::RepoSettings& getRepoSettings() { return m_RepoSettings; }
564 
565 public:
569  ~TrtISServer();
570 
585  static TrtServerPtr getInstance(const triton::RepoSettings* repo);
586 
590  bool isServerReady();
591 
595  bool isServerLive();
596 
603  bool isModelReady(const std::string& model, int64_t version);
604 
610  NvDsInferStatus loadModel(const std::string& modelName);
611 
617  NvDsInferStatus unloadModel(const std::string& modelName);
618 
627  const std::string& model, int64_t version, ni::ModelConfig& config);
628 
640  const std::string& model, int64_t version, SharedBatchArray& inputs,
641  const std::vector<std::string>& outputs, const std::vector<TritonClassParams>& clasList);
642 
656  SharedRequest request, WeakTritonAllocator allocator,
657  TritonInferAsyncDone done);
658 
659 private:
670  UniqResponse createResponse(
671  UniqTritonT<TRITONSERVER_InferenceResponse>&& data, uint64_t id);
672 
673  using InferUserData =
674  std::tuple<SharedRequest, TritonInferAsyncDone, TrtISServer*>;
684  static void InferComplete(
685  TRITONSERVER_InferenceResponse* response, const uint32_t flags,
686  void* userp);
687 
691  TRITONSERVER_Server* serverPtr() const { return m_Impl.get(); }
692 
694 
698  static std::weak_ptr<TrtISServer> sTrtServerInstance;
702  static std::mutex sTrtServerMutex;
703 
704 private:
708  UniqTritonT<TRITONSERVER_Server> m_Impl;
712  std::atomic<uint64_t> m_LastRequestId{UINT64_C(0)};
716  triton::RepoSettings m_RepoSettings;
717 };
718 
719 } // namespace nvdsinferserver
720 
721 #endif
nvdsinferserver::triton::RepoSettings::minComputeCapacity
double minComputeCapacity
The minimun supported compute compability for Triton server.
Definition: sources/libs/nvdsinferserver/infer_trtis_server.h:482
infer_batch_buffer.h
Header file of batch buffer related class declarations.
nvdsinferserver
This is a header file for pre-processing cuda kernels with normalization and mean subtraction require...
Definition: sources/gst-plugins/gst-nvinferserver/gstnvinferserver_impl.h:69
nvdsinferserver::triton::RepoSettings::initFrom
bool initFrom(const ic::TritonModelRepo &repo, const std::vector< int > &devIds)
Populate the RepoSettings instance with the values from the TritonModelRepo protobuf message.
nvdsinferserver::TrtServerRequest::outputs
const std::vector< std::string > & outputs() const
Get the list of requested output layer names.
Definition: sources/libs/nvdsinferserver/infer_trtis_server.h:161
nvdsinferserver::TrtISServer::isModelReady
bool isModelReady(const std::string &model, int64_t version)
Check if the server is ready for inference using specified model.
nvdsinferserver::TrtServerRequest::setRequestComplete
NvDsInferStatus setRequestComplete(TRITONSERVER_InferenceRequestReleaseFn_t requestCompleteCb, void *userPtr)
Set the release callback function for the request.
TritonClassParams
Definition: sources/includes/nvdsinferserver/infer_post_datatypes.h:96
TRITONSERVER_MemoryType
enum TRITONSERVER_memorytype_enum TRITONSERVER_MemoryType
TRITONSERVER_MemoryType.
DISABLE_CLASS_COPY
#define DISABLE_CLASS_COPY(NoCopyClass)
APIs/macros for some frequently used functionality.
Definition: sources/gst-plugins/gst-nvdspreprocess/nvdspreprocess_lib/nvdspreprocess_impl.h:41
nvdsinferserver::TrtServerRequest::id
uint64_t id() const
Get the request ID.
Definition: 9.1/sources/libs/nvdsinferserver/infer_trtis_server.h:148
nvdsinferserver::TrtServerRequest::classParams
const std::map< std::string, TritonClassParams > & classParams() const
Get the Triton classification parameters list (tensor name : classification parameters).
Definition: 9.1/sources/libs/nvdsinferserver/infer_trtis_server.h:166
nvdsinferserver::triton::RepoSettings::debugStr
std::string debugStr
Debug string of the TritonModelRepo protobuf message.
Definition: sources/libs/nvdsinferserver/infer_trtis_server.h:508
nvdsinferserver::TrtISServer::TrtServerResponse
friend class TrtServerResponse
Definition: sources/libs/nvdsinferserver/infer_trtis_server.h:540
nvdsinferserver::TrtServerResponse
Wrapper class for Triton output parsing.
Definition: sources/libs/nvdsinferserver/infer_trtis_server.h:224
nvdsinferserver::TrtServerResponse::getStatus
NvDsInferStatus getStatus() const
Check if the response could be parsed correctly.
Definition: 9.1/sources/libs/nvdsinferserver/infer_trtis_server.h:261
nvdsinferserver::ShrTritonT
std::shared_ptr< T > ShrTritonT
Definition: sources/libs/nvdsinferserver/infer_common.h:122
nvdsinferserver::TrtISServer::getInstance
static TrtServerPtr getInstance(const triton::RepoSettings *repo)
Get a new or existing instance of the Triton Inference Server.
nvdsinferserver::TrtISServer::createRequest
SharedRequest createRequest(const std::string &model, int64_t version, SharedBatchArray &inputs, const std::vector< std::string > &outputs, const std::vector< TritonClassParams > &clasList)
Create and initializes a new inference request.
nvdsinferserver::triton::RepoSettings::pinnedMemBytes
uint64_t pinnedMemBytes
Pre-allocated pinned memory on host for Triton runtime.
Definition: sources/libs/nvdsinferserver/infer_trtis_server.h:486
nvdsinferserver::triton::RepoSettings::strictModelConfig
bool strictModelConfig
Flag to enable/disable Triton strict model configuration.
Definition: sources/libs/nvdsinferserver/infer_trtis_server.h:478
nvdsinferserver::SharedBatchArray
std::shared_ptr< BaseBatchArray > SharedBatchArray
Definition: sources/libs/nvdsinferserver/infer_common.h:80
NVDSINFER_SUCCESS
@ NVDSINFER_SUCCESS
NvDsInferContext operation succeeded.
Definition: sources/includes/nvdsinfer.h:233
nvdsinferserver::TrtServerAllocator
Wrapper class for Triton server output memory allocator.
Definition: sources/libs/nvdsinferserver/infer_trtis_server.h:356
nvdsinferserver::TrtServerResponse::mutableOutputs
std::vector< SharedBatchBuf > & mutableOutputs()
Get the list of output batch buffers.
Definition: 9.1/sources/libs/nvdsinferserver/infer_trtis_server.h:257
nvdsinferserver::TrtServerRequest::bufId
uint64_t bufId() const
Get the input buffer ID associated with the request.
Definition: 9.1/sources/libs/nvdsinferserver/infer_trtis_server.h:152
nvdsinferserver::TrtISServer::isServerReady
bool isServerReady()
Check if the server is ready.
nvdsinferserver::triton::RepoSettings::logLevel
uint32_t logLevel
Level of the Triton log output.
Definition: sources/libs/nvdsinferserver/infer_trtis_server.h:466
nvdsinferserver::TritonInferAsyncDone
std::function< void(SharedRequest, UniqResponse)> TritonInferAsyncDone
Definition: sources/libs/nvdsinferserver/infer_trtis_server.h:68
nvdsinferserver::TrtISServer::initialize
NvDsInferStatus initialize()
Create a new instance of the Triton Inference Server.
nvdsinferserver::triton::BackendConfig::backend
std::string backend
Name of the backend.
Definition: sources/libs/nvdsinferserver/infer_trtis_server.h:444
nvdsinferserver::TrtISServer::getModelConfig
NvDsInferStatus getModelConfig(const std::string &model, int64_t version, ni::ModelConfig &config)
Get the model configuration for the specified model.
nvdsinferserver::triton::RepoSettings
Model repository settings for the Triton Inference Server.
Definition: sources/libs/nvdsinferserver/infer_trtis_server.h:458
nvdsinferserver::TrtServerAllocator::ptr
TRITONSERVER_ResponseAllocator * ptr()
Get the pointer to the TRITONSERVER_ResponseAllocator instance.
Definition: 9.1/sources/libs/nvdsinferserver/infer_trtis_server.h:379
TRITON_DEFAULT_BACKEND_DIR
#define TRITON_DEFAULT_BACKEND_DIR
Definition: 9.1/sources/libs/nvdsinferserver/infer_trtis_server.h:51
nvdsinferserver::triton::BackendConfig::key
std::string key
Name of the setting.
Definition: sources/libs/nvdsinferserver/infer_trtis_server.h:448
nvdsinferserver::TrtServerRequest::ptr
TRITONSERVER_InferenceRequest * ptr()
Get the pointer to the Triton inference request object.
Definition: 9.1/sources/libs/nvdsinferserver/infer_trtis_server.h:140
nvdsinferserver::TrtISServer::TrtISServer
TrtISServer(const triton::RepoSettings &repo)
Constructor.
nvdsinferserver::TrtServerResponse::TrtISServer
friend class TrtISServer
Definition: sources/libs/nvdsinferserver/infer_trtis_server.h:225
nvdsinferserver::UniqTritonT
std::unique_ptr< T, std::function< void(T *)> > UniqTritonT
Definition: sources/libs/nvdsinferserver/infer_common.h:119
nvdsinferserver::triton::RepoSettings::tfGpuMemoryFraction
float tfGpuMemoryFraction
TensorFlow GPU memory fraction per process.
Definition: sources/libs/nvdsinferserver/infer_trtis_server.h:474
nvdsinferserver::triton::RepoSettings::controlMode
int32_t controlMode
Triton model control mode.
Definition: sources/libs/nvdsinferserver/infer_trtis_server.h:494
nvdsinferserver::triton::RepoSettings::cudaDevMemMap
std::map< uint32_t, uint64_t > cudaDevMemMap
Map of the device IDs and corresponding size of CUDA memory pool to be allocated.
Definition: sources/libs/nvdsinferserver/infer_trtis_server.h:499
TRITONSERVER_MODEL_CONTROL_EXPLICIT
@ TRITONSERVER_MODEL_CONTROL_EXPLICIT
Definition: sources/libs/nvdsinferserver/tritonserver_include/tritonserver.h:1756
nvdsinferserver::TrtServerResponse::takeoverOptions
SharedOptions takeoverOptions()
Get and own the options list.
Definition: 9.1/sources/libs/nvdsinferserver/infer_trtis_server.h:265
nvdsinferserver::TrtServerRequest::TrtISServer
friend class TrtISServer
Definition: sources/libs/nvdsinferserver/infer_trtis_server.h:75
nvdsinferserver::ShrTritonAllocator
std::shared_ptr< TrtServerAllocator > ShrTritonAllocator
Definition: sources/libs/nvdsinferserver/infer_common.h:129
nvdsinferserver::triton::BackendConfig::value
std::string value
Value of the setting.
Definition: sources/libs/nvdsinferserver/infer_trtis_server.h:452
nvdsinferserver::SharedOptions
std::shared_ptr< IOptions > SharedOptions
Definition: sources/libs/nvdsinferserver/infer_common.h:78
nvdsinferserver::TrtServerRequest::TrtServerRequest
TrtServerRequest(TrtServerPtr server)
Constructor.
infer_proto_utils.h
nvdsinferserver::TrtServerRequest::init
NvDsInferStatus init(const std::string &model, int64_t version, SharedBatchArray &inputs, const std::vector< std::string > &outputs, uint64_t reqId, const std::vector< TritonClassParams > &clasList)
Create a new Triton inference request with the specified inputs and parameters.
nvdsinferserver::TrtServerRequest::RequestOnRelease
static void RequestOnRelease(TRITONSERVER_InferenceRequest *request, const uint32_t flags, void *userp)
The callback function to release the request instance.
TRITON_DEFAULT_PINNED_MEMORY_BYTES
#define TRITON_DEFAULT_PINNED_MEMORY_BYTES
Definition: 9.1/sources/libs/nvdsinferserver/infer_trtis_server.h:49
nvdsinferserver::TrtServerResponse::model
const std::string & model() const
Get the model name parsed from the Triton response.
Definition: 9.1/sources/libs/nvdsinferserver/infer_trtis_server.h:253
nvdsinferserver::TrtServerAllocator::~TrtServerAllocator
virtual ~TrtServerAllocator()=default
Destructor.
nvdsinferserver::triton::RepoSettings::tfAllowSoftPlacement
bool tfAllowSoftPlacement
Flag to enable/disable soft placement of TF operators.
Definition: sources/libs/nvdsinferserver/infer_trtis_server.h:470
nvdsinferserver::SharedSysMem
std::shared_ptr< SysMem > SharedSysMem
Definition: sources/libs/nvdsinferserver/infer_common.h:93
nvdsinferserver::TrtServerAllocator::AllocFn
std::function< SharedSysMem(const std::string &, size_t, InferMemType, int64_t)> AllocFn
Definition: sources/libs/nvdsinferserver/infer_trtis_server.h:359
nvdsinferserver::SharedResponse
std::shared_ptr< TrtServerResponse > SharedResponse
Definition: sources/libs/nvdsinferserver/infer_trtis_server.h:66
nvdsinferserver::TrtServerPtr
std::shared_ptr< TrtISServer > TrtServerPtr
Definition: sources/libs/nvdsinferserver/infer_common.h:126
nvdsinferserver::TrtServerRequest::~TrtServerRequest
~TrtServerRequest()
Destructor.
nvdsinferserver::TrtServerAllocator::FreeFn
std::function< void(const std::string &, SharedSysMem)> FreeFn
Definition: sources/libs/nvdsinferserver/infer_trtis_server.h:360
nvdsinferserver::TrtISServer::isServerLive
bool isServerLive()
Check if the server is live.
nvdsinferserver::triton::RepoSettings::backendDirectory
std::string backendDirectory
The path to the Triton backends directory.
Definition: sources/libs/nvdsinferserver/infer_trtis_server.h:490
nvdsinferserver::TrtServerResponse::parse
NvDsInferStatus parse(const TrtServerRequest *req)
Check for error and parse the inference output.
TRITON_DEFAULT_MINIMUM_COMPUTE_CAPABILITY
#define TRITON_DEFAULT_MINIMUM_COMPUTE_CAPABILITY
Definition: 9.1/sources/libs/nvdsinferserver/infer_trtis_server.h:48
nvdsinferserver::TrtServerRequest::setResponseComplete
NvDsInferStatus setResponseComplete(ShrTritonAllocator &allocator, TRITONSERVER_InferenceResponseCompleteFn_t responseCompleteCb, void *responseUserPtr)
Set the allocator and response callback for the request.
nvdsinferserver::IOptions
Definition: sources/includes/nvdsinferserver/infer_ioptions.h:59
nvdsinferserver::triton::RepoSettings::operator!=
bool operator!=(const RepoSettings &other) const
Definition: 9.1/sources/libs/nvdsinferserver/infer_trtis_server.h:527
nvdsinferserver::InferMemType
InferMemType
The memory types of inference buffers.
Definition: sources/includes/nvdsinferserver/infer_datatypes.h:61
nvdsinferserver::triton::RepoSettings::roots
std::set< std::string > roots
Set of model repository directories.
Definition: sources/libs/nvdsinferserver/infer_trtis_server.h:462
nvdsinferserver::triton::RepoSettings::backendConfigs
std::vector< BackendConfig > backendConfigs
Array of backend configurations settings.
Definition: sources/libs/nvdsinferserver/infer_trtis_server.h:503
nvdsinferserver::TrtISServer::loadModel
NvDsInferStatus loadModel(const std::string &modelName)
Load or reload the specified model.
nvdsinferserver::triton::RepoSettings::operator==
bool operator==(const RepoSettings &other) const
Comparison operators.
nvdsinferserver::TrtISServer::~TrtISServer
~TrtISServer()
Destructor.
nvdsinferserver::WeakTritonAllocator
std::weak_ptr< TrtServerAllocator > WeakTritonAllocator
Definition: sources/libs/nvdsinferserver/infer_common.h:130
nvdsinferserver::TrtServerRequest::model
const std::string & model() const
Get the model name.
Definition: sources/libs/nvdsinferserver/infer_trtis_server.h:144
TRITONSERVER_InferenceRequestReleaseFn_t
void(* TRITONSERVER_InferenceRequestReleaseFn_t)(struct TRITONSERVER_InferenceRequest *request, const uint32_t flags, void *userp)
Type for inference request release callback function.
Definition: sources/libs/nvdsinferserver/tritonserver_include/tritonserver.h:996
TRITONSERVER_InferenceResponseCompleteFn_t
void(* TRITONSERVER_InferenceResponseCompleteFn_t)(struct TRITONSERVER_InferenceResponse *response, const uint32_t flags, void *userp)
Type for callback function indicating that an inference response has completed.
Definition: sources/libs/nvdsinferserver/tritonserver_include/tritonserver.h:1017
nvdsinferserver::UniqResponse
std::unique_ptr< TrtServerResponse > UniqResponse
Definition: sources/libs/nvdsinferserver/infer_trtis_server.h:65
nvdsinferserver::TrtServerResponse::TrtServerResponse
TrtServerResponse(TrtServerPtr server, UniqTritonT< TRITONSERVER_InferenceResponse > data, uint64_t id)
Constructor.
nvdsinferserver::TrtServerRequest
Wrapper class for Triton inference request.
Definition: sources/libs/nvdsinferserver/infer_trtis_server.h:73
nvdsinferserver::TrtISServer::TrtServerRequest
friend class TrtServerRequest
Definition: sources/libs/nvdsinferserver/infer_trtis_server.h:539
nvdsinferserver::TrtISServer::unloadModel
NvDsInferStatus unloadModel(const std::string &modelName)
Unload the specified model.
nvdsinferserver::SharedRequest
std::shared_ptr< TrtServerRequest > SharedRequest
Definition: sources/libs/nvdsinferserver/infer_trtis_server.h:64
nvdsinferserver::TrtISServer::inferAsync
NvDsInferStatus inferAsync(SharedRequest request, WeakTritonAllocator allocator, TritonInferAsyncDone done)
Submit a request for asynchronous inference.
nvdsinferserver::TrtISServer::getRepoSettings
const triton::RepoSettings & getRepoSettings()
Get the model repository settings.
Definition: 9.1/sources/libs/nvdsinferserver/infer_trtis_server.h:563
infer_trtis_utils.h
Triton Inference Server utilies header file.
nvdsinferserver::TrtServerRequest::releaseInputs
SharedBatchArray releaseInputs()
Release the ownership of input batch buffer array.
Definition: 9.1/sources/libs/nvdsinferserver/infer_trtis_server.h:157
nvdsinferserver::TrtServerAllocator::TrtServerAllocator
TrtServerAllocator(AllocFn alloc, FreeFn release)
Constructor, create an instance of the type TRITONSERVER_ResponseAllocator which calls provided alloc...
NvDsInferStatus
NvDsInferStatus
Enum for the status codes returned by NvDsInferContext.
Definition: sources/includes/nvdsinfer.h:231
nvdsinferserver::InferBufferDescription
Holds the information about a inference buffer.
Definition: sources/includes/nvdsinferserver/infer_datatypes.h:173