NVIDIA DeepStream SDK API Reference

9.2 Release
sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/infer/engine_builder.h File Reference

Go to the source code of this file.

Data Structures

struct  TRTDeleter
 
class  Logger
 

Macros

#define TRT_MAJOR_VERSION   10
 
#define TRT_MINOR_VERSION   3
 
#define TRT_PATCH_VERSION   0
 

Typedefs

template<typename T >
using TRTUniquePtr = std::unique_ptr< T, TRTDeleter >
 

Functions

bool buildEngineFromOnnx (const std::string &onnxFilePath, const std::string &engineFilePath, int batchSize, int numSensors, bool fp16Mode, PrettyLogger *logger=nullptr)
 Builds a TensorRT engine from an ONNX model and saves it to the specified file path. More...
 

Variables

Logger logger
 

Macro Definition Documentation

◆ TRT_MAJOR_VERSION

#define TRT_MAJOR_VERSION   10

◆ TRT_MINOR_VERSION

#define TRT_MINOR_VERSION   3

◆ TRT_PATCH_VERSION

#define TRT_PATCH_VERSION   0

Typedef Documentation

◆ TRTUniquePtr

template<typename T >
using TRTUniquePtr = std::unique_ptr<T, TRTDeleter>

Function Documentation

◆ buildEngineFromOnnx()

bool buildEngineFromOnnx ( const std::string &  onnxFilePath,
const std::string &  engineFilePath,
int  batchSize,
int  numSensors,
bool  fp16Mode,
PrettyLogger *  logger = nullptr 
)

Builds a TensorRT engine from an ONNX model and saves it to the specified file path.

Compatible with TensorRT 10.3.

Parameters
onnxFilePathPath to the input ONNX model
engineFilePathPath where the output engine should be saved
batchSizeSparse4D model batch size
numSensorsNumber of sensors [Deepstream batch size]
fp16ModeWhether to enable FP16 mode for faster inference
loggerOptional logger for structured logging
Returns
True if the engine was built successfully, false otherwise

Variable Documentation

◆ logger

Logger logger