|
|
NVIDIA DeepStream SDK API Reference
|
9.1 Release
|
Go to the documentation of this file.
24 #ifndef __NVDSINFER_TRTIS_UTILS_H__
25 #define __NVDSINFER_TRTIS_UTILS_H__
34 #include "infer_datatypes.h"
37 #include "model_config.pb.h"
38 #include "tritonserver.h"
45 #define CHECK_TRTIS_ERR_W_ACTION(trtisExpr, action, fmt, ...) \
47 UniqTritonT<TRITONSERVER_Error> errPtr( \
48 (trtisExpr), TRITONSERVER_ErrorDelete); \
51 "Triton: " fmt ", triton_err_str:%s, err_msg:%s", \
52 ##__VA_ARGS__, TRITONSERVER_ErrorCodeString(errPtr.get()), \
53 TRITONSERVER_ErrorMessage(errPtr.get())); \
62 #define RETURN_TRTIS_ERROR(trtisExpr, fmt, ...) \
63 CHECK_TRTIS_ERR_W_ACTION(trtisExpr, return NVDSINFER_TRITON_ERROR, fmt, ##__VA_ARGS__)
69 #define CONTINUE_TRTIS_ERROR(trtisExpr, fmt, ...) \
70 CHECK_TRTIS_ERR_W_ACTION(trtisExpr, , fmt, ##__VA_ARGS__)
72 namespace ni = inference;
134 template <
typename VecDims>
141 for (
const auto &v : shape) {
This is a header file for pre-processing cuda kernels with normalization and mean subtraction require...
InferMemType MemTypeFromTriton(TRITONSERVER_MemoryType type)
Maps the TRITONSERVER_MemoryType to the InferMemType.
InferDataType
Datatype of the tensor buffer.
Header file of the common declarations for the nvinferserver library.
enum TRITONSERVER_memorytype_enum TRITONSERVER_MemoryType
TRITONSERVER_MemoryType.
InferDataType DataTypeFromTritonPb(ni::DataType type)
Maps the data type from Triton model configuration proto definition to InferDataType.
InferTensorOrder
The type of tensor order.
TRITONSERVER_DataType DataTypeToTriton(InferDataType type)
Maps the InferDataType to TRITONSERVER_DataType.
void normalizeDims(InferDims &dims)
InferDataType DataTypeFromTriton(TRITONSERVER_DataType type)
Maps the TRITONSERVER_DataType to the InferDataType.
InferDims DimsFromTriton(const VecDims &shape)
Converts the input shape vector from Triton to InferDims type.
bool hasWildcard(const nvinfer1::Dims &dims)
#define NVDSINFER_MAX_DIMS
enum TRITONSERVER_datatype_enum TRITONSERVER_DataType
TRITONSERVER_DataType.
Header file containing utility functions and classes used by the nvinferserver low level library.
InferMemType
The memory types of inference buffers.
InferTensorOrder TensorOrderFromTritonPb(ni::ModelInput::Format order)
Maps the tensor order from Triton model configuration proto definition to the InferTensorOrder type.
InferTensorOrder TensorOrderFromTritonMeta(const std::string &format)
Maps the tensor order from Triton metadata string to the InferTensorOrder type.
TRITONSERVER_MemoryType MemTypeToTriton(InferMemType type)
Maps the InferMemType to the TRITONSERVER_MemoryType.
const char * TritonControlModeToStr(int32_t mode)
Returns a string describing the TRITONSERVER_ModelControlMode: none, explicit or poll.
static std::string format(const char *fmt,...)