NVIDIA DeepStream SDK API Reference

9.1 Release
sources/libs/nvdsinferserver/infer_simple_runtime.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 
18 #ifndef __NVDSINFERSERVER_SIMPLE_RUNTIME_H__
19 #define __NVDSINFERSERVER_SIMPLE_RUNTIME_H__
20 
21 #include "infer_common.h"
22 #include "infer_trtis_backend.h"
23 
24 namespace nvdsinferserver {
25 
27 public:
28  TritonSimpleRuntime(std::string model, int64_t version);
29  ~TritonSimpleRuntime() override;
30 
31  void setOutputs(const std::set<std::string>& names)
32  {
33  m_RequestOutputs = names;
34  }
35 
36  // derived functions
37  NvDsInferStatus initialize() override;
38 
39 protected:
40  NvDsInferStatus specifyInputDims(const InputShapes& shapes) override;
42  InputsConsumed bufConsumed, InferenceDone inferenceDone) override;
43  void requestTritonOutputNames(std::set<std::string>& names) override;
44 
45 private:
46  SharedSysMem allocateSimpleRes(
47  const std::string& tensor, size_t bytes, InferMemType memType, int64_t devId);
48  // Mark releaseCallback as static in case
49  static void releaseSimpleRes(const std::string& tensor, SharedSysMem mem);
50 
51 private:
52  std::set<std::string> m_RequestOutputs;
53 };
54 
55 }
56 
57 #endif
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::TrtISBackend::model
const std::string & model() const
Definition: sources/libs/nvdsinferserver/infer_trtis_backend.h:78
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: sources/libs/nvdsinferserver/infer_ibackend.h:89
nvdsinferserver::IBackend::InputsConsumed
std::function< void(SharedBatchArray)> InputsConsumed
Function wrapper called after the input buffer is consumed.
Definition: sources/libs/nvdsinferserver/infer_ibackend.h:75
infer_trtis_backend.h
Header file of Triton Inference Server inference backend.
nvdsinferserver::TrtISBackend
Triton backend processing class.
Definition: sources/libs/nvdsinferserver/infer_trtis_backend.h:44
nvdsinferserver::SharedBatchArray
std::shared_ptr< BaseBatchArray > SharedBatchArray
Definition: sources/libs/nvdsinferserver/infer_common.h:80
nvdsinferserver::TritonSimpleRuntime
Definition: sources/libs/nvdsinferserver/infer_simple_runtime.h:26
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: sources/libs/nvdsinferserver/infer_ibackend.h:71
nvdsinferserver::TrtISBackend::version
int64_t version() const
Definition: sources/libs/nvdsinferserver/infer_trtis_backend.h:79
nvdsinferserver::SharedCuStream
std::shared_ptr< CudaStream > SharedCuStream
Cuda based pointers.
Definition: sources/libs/nvdsinferserver/infer_common.h:89
nvdsinferserver::TritonSimpleRuntime::specifyInputDims
NvDsInferStatus specifyInputDims(const InputShapes &shapes) override
nvdsinferserver::SharedSysMem
std::shared_ptr< SysMem > SharedSysMem
Definition: sources/libs/nvdsinferserver/infer_common.h:93
nvdsinferserver::TritonSimpleRuntime::~TritonSimpleRuntime
~TritonSimpleRuntime() override
nvdsinferserver::TritonSimpleRuntime::setOutputs
void setOutputs(const std::set< std::string > &names)
Definition: sources/libs/nvdsinferserver/infer_simple_runtime.h:31
nvdsinferserver::InferMemType
InferMemType
The memory types of inference buffers.
Definition: sources/includes/nvdsinferserver/infer_datatypes.h:61
nvdsinferserver::TritonSimpleRuntime::initialize
NvDsInferStatus initialize() override
nvdsinferserver::TritonSimpleRuntime::requestTritonOutputNames
void requestTritonOutputNames(std::set< std::string > &names) override
NvDsInferStatus
NvDsInferStatus
Enum for the status codes returned by NvDsInferContext.
Definition: sources/includes/nvdsinfer.h:231