NVIDIA DeepStream SDK API Reference

7.0 Release
infer_simple_runtime.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2020 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 
13 #ifndef __NVDSINFERSERVER_SIMPLE_RUNTIME_H__
14 #define __NVDSINFERSERVER_SIMPLE_RUNTIME_H__
15 
16 #include "infer_common.h"
17 #include "infer_trtis_backend.h"
18 
19 namespace nvdsinferserver {
20 
22 public:
23  TritonSimpleRuntime(std::string model, int64_t version);
24  ~TritonSimpleRuntime() override;
25 
26  void setOutputs(const std::set<std::string>& names)
27  {
28  m_RequestOutputs = names;
29  }
30 
31  // derived functions
32  NvDsInferStatus initialize() override;
33 
34 protected:
35  NvDsInferStatus specifyInputDims(const InputShapes& shapes) override;
37  InputsConsumed bufConsumed, InferenceDone inferenceDone) override;
38  void requestTritonOutputNames(std::set<std::string>& names) override;
39 
40 private:
41  SharedSysMem allocateSimpleRes(
42  const std::string& tensor, size_t bytes, InferMemType memType, int64_t devId);
43  // Mark releaseCallback as static in case
44  static void releaseSimpleRes(const std::string& tensor, SharedSysMem mem);
45 
46 private:
47  std::set<std::string> m_RequestOutputs;
48 };
49 
50 }
51 
52 #endif
nvdsinferserver
This is a header file for pre-processing cuda kernels with normalization and mean subtraction require...
Definition: infer_custom_process.h:24
nvdsinferserver::TrtISBackend::model
const std::string & model() const
Definition: infer_trtis_backend.h:73
nvdsinferserver::TritonSimpleRuntime::enqueue
NvDsInferStatus enqueue(SharedBatchArray inputs, SharedCuStream stream, InputsConsumed bufConsumed, InferenceDone inferenceDone) override
nvdsinferserver::TritonSimpleRuntime::TritonSimpleRuntime
TritonSimpleRuntime(std::string model, int64_t version)
nvdsinferserver::IBackend::InputShapes
std::vector< InputShapeTuple > InputShapes
Definition: infer_ibackend.h:84
infer_trtis_backend.h
Header file of Triton Inference Server inference backend.
nvdsinferserver::SharedSysMem
std::shared_ptr< SysMem > SharedSysMem
Definition: infer_common.h:88
nvdsinferserver::IBackend::InputsConsumed
std::function< void(SharedBatchArray)> InputsConsumed
Function wrapper called after the input buffer is consumed.
Definition: infer_ibackend.h:70
nvdsinferserver::TrtISBackend
Triton backend processing class.
Definition: infer_trtis_backend.h:39
nvdsinferserver::TritonSimpleRuntime
Definition: infer_simple_runtime.h:21
infer_common.h
Header file of the common declarations for the nvinferserver library.
nvdsinferserver::IBackend::InferenceDone
std::function< void(NvDsInferStatus, SharedBatchArray)> InferenceDone
Function wrapper for post inference processing.
Definition: infer_ibackend.h:66
nvdsinferserver::TrtISBackend::version
int64_t version() const
Definition: infer_trtis_backend.h:74
nvdsinferserver::TritonSimpleRuntime::specifyInputDims
NvDsInferStatus specifyInputDims(const InputShapes &shapes) override
nvdsinferserver::TritonSimpleRuntime::~TritonSimpleRuntime
~TritonSimpleRuntime() override
nvdsinferserver::SharedCuStream
std::shared_ptr< CudaStream > SharedCuStream
Cuda based pointers.
Definition: infer_common.h:84
nvdsinferserver::TritonSimpleRuntime::setOutputs
void setOutputs(const std::set< std::string > &names)
Definition: infer_simple_runtime.h:26
nvdsinferserver::InferMemType
InferMemType
The memory types of inference buffers.
Definition: infer_datatypes.h:56
nvdsinferserver::TritonSimpleRuntime::initialize
NvDsInferStatus initialize() override
nvdsinferserver::SharedBatchArray
std::shared_ptr< BaseBatchArray > SharedBatchArray
Definition: infer_common.h:75
nvdsinferserver::TritonSimpleRuntime::requestTritonOutputNames
void requestTritonOutputNames(std::set< std::string > &names) override
NvDsInferStatus
NvDsInferStatus
Enum for the status codes returned by NvDsInferContext.
Definition: nvdsinfer.h:218