TRT8 works with almost every nerual network now!!!!(including demo3d)
This commit is contained in:
@@ -7,10 +7,10 @@
|
||||
#include <utils.h>
|
||||
|
||||
namespace nvinfer1 {
|
||||
class RegionRT : public IPluginV2 {
|
||||
class RegionRT : public IPluginV2Ext {
|
||||
|
||||
public:
|
||||
RegionRT(int classes, int coords, int num);
|
||||
RegionRT(int classes, int coords, int num,int c,int h,int w);
|
||||
|
||||
~RegionRT() ;
|
||||
|
||||
@@ -20,9 +20,6 @@ namespace nvinfer1 {
|
||||
|
||||
Dims getOutputDimensions(int index, const Dims *inputs, int nbInputDims) NOEXCEPT override ;
|
||||
|
||||
void configureWithFormat(const Dims *inputDims, int nbInputs, const Dims *outputDims, int nbOutputs, DataType type,
|
||||
PluginFormat format, int maxBatchSize) NOEXCEPT override ;
|
||||
|
||||
int initialize() NOEXCEPT override ;
|
||||
|
||||
|
||||
@@ -32,7 +29,7 @@ namespace nvinfer1 {
|
||||
|
||||
#if NV_TENSORRT_MAJOR > 7
|
||||
int enqueue(int batchSize, const void *const *inputs, void *const *outputs, void *workspace,
|
||||
cudaStream_t stream) NOEXCEPT override ;
|
||||
cudaStream_t stream) NOEXCEPT override ;
|
||||
#elif NV_TENSORRT_MAJOR == 7
|
||||
int32_t enqueue (int32_t batchSize, const void *const *inputs, void **outputs, void *workspace, cudaStream_t stream) override;
|
||||
#endif
|
||||
@@ -54,7 +51,22 @@ namespace nvinfer1 {
|
||||
|
||||
bool supportsFormat(DataType type, PluginFormat format) const NOEXCEPT override ;
|
||||
|
||||
IPluginV2 *clone() const NOEXCEPT override ;
|
||||
DataType getOutputDataType(int index, const nvinfer1::DataType* inputTypes, int nbInputs) const NOEXCEPT override;
|
||||
|
||||
void attachToContext(cudnnContext* cudnnContext, cublasContext* cublasContext, IGpuAllocator* gpuAllocator) NOEXCEPT override;
|
||||
|
||||
bool isOutputBroadcastAcrossBatch(int outputIndex, const bool* inputIsBroadcasted, int nbInputs) const NOEXCEPT override;
|
||||
|
||||
bool canBroadcastInputAcrossBatch(int inputIndex) const NOEXCEPT override;
|
||||
|
||||
void configurePlugin (Dims const *inputDims, int32_t nbInputs, Dims const *outputDims,
|
||||
int32_t nbOutputs, DataType const *inputTypes, DataType const *outputTypes,
|
||||
bool const *inputIsBroadcast, bool const *outputIsBroadcast, PluginFormat floatFormat,
|
||||
int32_t maxBatchSize) NOEXCEPT override;
|
||||
|
||||
void detachFromContext() NOEXCEPT override;
|
||||
|
||||
IPluginV2Ext *clone() const NOEXCEPT override ;
|
||||
int c, h, w;
|
||||
int classes, coords, num;
|
||||
|
||||
@@ -76,9 +88,9 @@ namespace nvinfer1 {
|
||||
|
||||
const char *getPluginNamespace() const NOEXCEPT override ;
|
||||
|
||||
IPluginV2 *deserializePlugin(const char *name, const void *serialData, size_t serialLength) NOEXCEPT override ;
|
||||
IPluginV2Ext *deserializePlugin(const char *name, const void *serialData, size_t serialLength) NOEXCEPT override ;
|
||||
|
||||
IPluginV2 *createPlugin(const char *name, const PluginFieldCollection *fc) NOEXCEPT override ;
|
||||
IPluginV2Ext *createPlugin(const char *name, const PluginFieldCollection *fc) NOEXCEPT override ;
|
||||
|
||||
const char *getPluginName() const NOEXCEPT override ;
|
||||
|
||||
@@ -96,4 +108,3 @@ namespace nvinfer1 {
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user