Migrate tkDNN max pooling plugin creation to pluginRegistry from the default method

This commit is contained in:
perseusdg
2021-11-10 20:09:57 +05:30
parent 7dd33cd118
commit 9e328c0daa
4 changed files with 24 additions and 6 deletions
+7 -4
View File
@@ -4,6 +4,9 @@ using namespace nvinfer1;
std::vector<PluginField> MaxPoolFixedSizeRTPluginCreator::mPluginAttributes;
PluginFieldCollection MaxPoolFixedSizeRTPluginCreator::mFC{};
static const char* MAXPOOLFIXEDSIZERT_PLUGIN_VERSION{"1"};
static const char* MAXPOOLFIXEDSIZERT_PLUGIN_NAME{"MaxPoolingFixedSizeRT_tkDNN"};
MaxPoolFixedSizeRT::MaxPoolFixedSizeRT(int c, int h, int w, int n, int strideH, int strideW, int winSize, int padding){
this->c = c;
this->h = h;
@@ -105,11 +108,11 @@ void MaxPoolFixedSizeRT::setPluginNamespace(const char *pluginNamespace) NOEXCEP
}
const char *MaxPoolFixedSizeRT::getPluginType() const NOEXCEPT {
return "MaxPoolingFixedSizeRT_tkDNN";
return MAXPOOLFIXEDSIZERT_PLUGIN_NAME;
}
const char *MaxPoolFixedSizeRT::getPluginVersion() const NOEXCEPT {
return "1";
return MAXPOOLFIXEDSIZERT_PLUGIN_VERSION;
}
IPluginV2Ext *MaxPoolFixedSizeRT::clone() const NOEXCEPT {
@@ -185,11 +188,11 @@ IPluginV2Ext *MaxPoolFixedSizeRTPluginCreator::createPlugin(const char *name, co
}
const char *MaxPoolFixedSizeRTPluginCreator::getPluginName() const NOEXCEPT {
return "MaxPoolingFixedSizeRT_tkDNN";
return MAXPOOLFIXEDSIZERT_PLUGIN_NAME;
}
const char *MaxPoolFixedSizeRTPluginCreator::getPluginVersion() const NOEXCEPT {
return "1";
return MAXPOOLFIXEDSIZERT_PLUGIN_VERSION;
}
const PluginFieldCollection *MaxPoolFixedSizeRTPluginCreator::getFieldNames() NOEXCEPT {