NVIDIA DeepStream SDK API Reference

6.4 Release
infer_trtis_context.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2019-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
22 #ifndef __INFER_TRTIS_CONTEXT_H__
23 #define __INFER_TRTIS_CONTEXT_H__
24 
25 #include "infer_common.h"
26 #include "infer_cuda_context.h"
27 
28 namespace nvdsinferserver {
29 
34 public:
39 
43  ~InferTrtISContext() override;
44 
48  NvDsInferStatus deinit() override;
49 
54  {
55  assert(m_MainStream);
56  return m_MainStream;
57  }
58 
59 private:
67  NvDsInferStatus createNNBackend(const ic::BackendParams& params,
69 
79  NvDsInferStatus allocateResource(
80  const ic::InferenceConfig& config) override;
81 
90  NvDsInferStatus specifyBackendDims(
91  BaseBackend* be, const std::string& model, const ic::BackendParams& params);
92 
101  NvDsInferStatus getConfigInOutMap(
102  const ic::BackendParams& params,
103  std::unordered_map<std::string, InferDims>& inputs,
104  std::set<std::string>& outputs);
105 
106 private:
110  SharedCuStream m_MainStream;
114  TrtISBackend* m_Backend{nullptr};
115 };
116 
117 } // namespace nvdsinferserver
118 
119 #endif
nvdsinferserver
Copyright (c) 2021, NVIDIA CORPORATION.
Definition: infer_custom_process.h:28
nvdsinferserver::InferTrtISContext::InferTrtISContext
InferTrtISContext()
Constructor, default.
nvdsinferserver::InferBaseContext::maxBatchSize
int maxBatchSize() const
Definition: infer_base_context.h:99
nvdsinferserver::TrtISBackend
Triton backend processing class.
Definition: infer_trtis_backend.h:39
infer_cuda_context.h
Header file for the CUDA inference context class.
infer_common.h
Header file of the common declarations for the nvinferserver library.
nvdsinferserver::InferTrtISContext::mainStream
SharedCuStream & mainStream() override
Get the main processing CUDA event.
Definition: infer_trtis_context.h:53
nvdsinferserver::UniqBackend
std::unique_ptr< BaseBackend > UniqBackend
Definition: infer_base_backend.h:212
nvdsinferserver::InferTrtISContext::~InferTrtISContext
~InferTrtISContext() override
Destructor, default.
nvdsinferserver::SharedCuStream
std::shared_ptr< CudaStream > SharedCuStream
Cuda based pointers.
Definition: infer_common.h:84
nvdsinferserver::InferBaseContext::backend
BaseBackend * backend()
Definition: infer_base_context.h:101
nvdsinferserver::InferTrtISContext
Inference context accessing Triton Inference Server in C-API mode.
Definition: infer_trtis_context.h:33
nvdsinferserver::InferBaseContext::config
const ic::InferenceConfig & config() const
Definition: infer_base_context.h:98
nvdsinferserver::InferTrtISContext::deinit
NvDsInferStatus deinit() override
Synchronize on the CUDA stream and call InferCudaContext::deinit().
nvdsinferserver::BaseBackend
Base class of inference backend processing.
Definition: infer_base_backend.h:40
NvDsInferStatus
NvDsInferStatus
Enum for the status codes returned by NvDsInferContext.
Definition: nvdsinfer.h:218
nvdsinferserver::InferCudaContext
Class for inference context CUDA processing.
Definition: infer_cuda_context.h:44