19#include <NvInferVersion.h>
21#ifdef NV_TENSORRT_MAJOR
22 #if NV_TENSORRT_MAJOR == 8
31#include "NvCaffeParser.h"
33#if GPU_PLATFORM == NVIDIA
35#elif GPU_PLATFORM == AMD
36 #include <miopen/miopen.h>
37 #define CUDNN_DATA_FLOAT miopenFloat
38 #define CUDNN_SOFTMAX_ACCURATE MIOPEN_SOFTMAX_ACCURATE
39 #define CUDNN_SOFTMAX_MODE_CHANNEL MIOPEN_SOFTMAX_MODE_CHANNEL
40 #define cudnnCreate miopenCreate
41 #define cudnnCreateTensorDescriptor miopenCreateTensorDescriptor
42 #define cudnnDestroy miopenDestroy
43 #define cudnnDestroyTensorDescriptor miopenDestroyTensorDescriptor
44 #define cudnnHandle_t miopenHandle_t
45 #define cudnnSetStream miopenSetStream
46 #define cudnnSetTensor4dDescriptorEx miopenSet4dTensorDescriptorEx
47 #define cudnnTensorDescriptor_t miopenTensorDescriptor_t
50#include "modules/perception/common/proto/rt.pb.h"
59typedef std::map<std::string, std::vector<nvinfer1::Weights>>
WeightMap;
60typedef std::map<std::string, nvinfer1::ITensor *>
TensorMap;
61typedef std::map<std::string, nvinfer1::DimsCHW>
TensorDimsMap;
67 std::map<std::string, std::string> *tensor_modify_map,
68 std::vector<LayerParameter> *order);
83bool ParserConvParam(
const ConvolutionParameter &conv, ConvParam *param);
86 assert(d.nbDims >= 3);
bool ParserConvParam(const ConvolutionParameter &conv, ConvParam *param)
std::map< std::string, Tensor > TensorMap
void ParseNetParam(const NetParameter &net_param, TensorDimsMap *tensor_dims_map, std::map< std::string, std::string > *tensor_modify_map, std::vector< LayerParameter > *order)
nvinfer1::DimsCHW ReshapeDims(const nvinfer1::DimsCHW &dims, const nvinfer1::DimsCHW &inputDims)
std::map< std::string, TensorDims > TensorDimsMap
bool modify_pool_param(PoolingParameter *pool_param)
std::map< std::string, std::vector< Weights > > WeightMap
nvinfer1::DimsCHW getCHW(const nvinfer1::Dims &d)